fix(indexBar): index-bar not positioned correctly when scrolled to the bottom (#10994)

This commit is contained in:
Alan Wang
2022-09-02 23:01:22 +08:00
committed by GitHub
parent 94c5afe65c
commit 1837ed712f

View File

@@ -221,13 +221,13 @@ export default defineComponent({
const scrollParentRect = useRect(scrollParent);
const { offsetHeight } = document.documentElement;
match.$el.scrollIntoView();
if (scrollTop === offsetHeight - scrollParentRect.height) {
onScroll();
return;
}
match.$el.scrollIntoView();
if (props.sticky && props.stickyOffsetTop) {
setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
}