From 7091d109aa2da5ff50b237a322cccc9cb3dacbb0 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Fri, 8 Sep 2023 15:56:45 +0700 Subject: [PATCH] fix bug --- src/views/MainLayout.vue | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index c7f2ec80..7f52ced3 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -18,7 +18,7 @@ import type { import { menuList, tabList, - tabListPlacement, + // tabListPlacement, } from "../interface/request/main/main"; const { setVerticalScrollPosition, getVerticalScrollPosition } = scroll; @@ -289,32 +289,32 @@ const updateScrollPlacement = (position: number) => { position = document.documentElement.scrollTop || document.body.scrollTop; } - let last; - for (const i in tabListPlacement) { - const section = tabListPlacement[i]; - const item = document.getElementById(section.tag); + // let last; + // for (const i in tabListPlacement) { + // const section = tabListPlacement[i]; + // const item = document.getElementById(section.tag); - if (item === null) { - continue; - } + // if (item === null) { + // continue; + // } - if (item.offsetTop >= position + 100) { - if (last === void 0) { - last = section.tag; - } - break; - } else { - last = section.tag; - } - } + // if (item.offsetTop >= position + 100) { + // if (last === void 0) { + // last = section.tag; + // } + // break; + // } else { + // last = section.tag; + // } + // } - if (last !== void 0) { - changeTab(last); - const tocEl = document.getElementById("tab--" + last); - if (tocEl) { - tocEl.scrollIntoView({ block: "nearest" }); - } - } + // if (last !== void 0) { + // changeTab(last); + // const tocEl = document.getElementById("tab--" + last); + // if (tocEl) { + // tocEl.scrollIntoView({ block: "nearest" }); + // } + // } }; const activeBtnPlacement = () => { @@ -830,7 +830,7 @@ if (keycloak.tokenParsed != null) { - - + -->