fix bug
This commit is contained in:
parent
fa245db14d
commit
7091d109aa
1 changed files with 26 additions and 26 deletions
|
|
@ -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) {
|
|||
</q-drawer>
|
||||
|
||||
<!-- drawer page placement2/detail/:id -->
|
||||
<q-drawer
|
||||
<!-- <q-drawer
|
||||
side="right"
|
||||
class="bg-grey-2"
|
||||
show-if-above
|
||||
|
|
@ -865,7 +865,7 @@ if (keycloak.tokenParsed != null) {
|
|||
</q-item>
|
||||
</q-list>
|
||||
</q-scroll-area>
|
||||
</q-drawer>
|
||||
</q-drawer> -->
|
||||
<!-- drawer -->
|
||||
|
||||
<q-page-container class="bg-grey-2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue