diff --git a/packages/vant/src/index-bar/IndexBar.tsx b/packages/vant/src/index-bar/IndexBar.tsx index 902fc6d6a..bdd23002b 100644 --- a/packages/vant/src/index-bar/IndexBar.tsx +++ b/packages/vant/src/index-bar/IndexBar.tsx @@ -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); }