mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-15 01:33:54 +00:00
total cleanups
This commit is contained in:
parent
d71808d036
commit
cf2fb2f958
@ -75,18 +75,16 @@ export default defineComponent({
|
|||||||
document.querySelectorAll(".item").forEach((element) => {
|
document.querySelectorAll(".item").forEach((element) => {
|
||||||
observer.observe(element);
|
observer.observe(element);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function initScroller() {
|
function initScroller() {
|
||||||
scrollWrapRef?.value?.addEventListener("scroll", (e: Event) => {
|
scrollWrapRef?.value?.addEventListener("scroll", (e: Event) => {
|
||||||
const isBottom =
|
const isBottom =
|
||||||
scrollWrapRef?.value?.offsetHeight +
|
scrollWrapRef?.value?.offsetHeight + scrollWrapRef?.value?.scrollTop + 40 >
|
||||||
scrollWrapRef?.value?.scrollTop +
|
|
||||||
40 >
|
|
||||||
scrollWrapRef?.value?.scrollHeight;
|
scrollWrapRef?.value?.scrollHeight;
|
||||||
|
|
||||||
if (isBottom) {
|
if (isBottom) {
|
||||||
scrollWrapRef?.value.scroll(0, 0);
|
scrollWrapRef?.value.scroll(0, 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -182,7 +182,6 @@ export default defineComponent({
|
|||||||
const tabRef = ref<any>("");
|
const tabRef = ref<any>("");
|
||||||
const tabObserveContainer = ref<any>(null);
|
const tabObserveContainer = ref<any>(null);
|
||||||
const currentItem = ref("");
|
const currentItem = ref("");
|
||||||
|
|
||||||
|
|
||||||
const l = dashboardStore.layout.findIndex((d: LayoutConfig) => d.i === props.data.i);
|
const l = dashboardStore.layout.findIndex((d: LayoutConfig) => d.i === props.data.i);
|
||||||
if (dashboardStore.layout[l].children.length) {
|
if (dashboardStore.layout[l].children.length) {
|
||||||
@ -286,7 +285,7 @@ export default defineComponent({
|
|||||||
dashboardStore.layout[l].children[activeTabIndex.value].children
|
dashboardStore.layout[l].children[activeTabIndex.value].children
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function initScrollWatcher() {
|
function initScrollWatcher() {
|
||||||
tabObserveContainer?.value?.addEventListener("scroll", (e: Event) => {
|
tabObserveContainer?.value?.addEventListener("scroll", (e: Event) => {
|
||||||
const isBottom =
|
const isBottom =
|
||||||
|
Loading…
Reference in New Issue
Block a user