diff --git a/packages/vant/src/coupon-list/test/__snapshots__/index.spec.ts.snap b/packages/vant/src/coupon-list/test/__snapshots__/index.spec.ts.snap
index 311c8b913..e29cb2abb 100644
--- a/packages/vant/src/coupon-list/test/__snapshots__/index.spec.ts.snap
+++ b/packages/vant/src/coupon-list/test/__snapshots__/index.spec.ts.snap
@@ -346,7 +346,7 @@ exports[`should have two "van-coupon-list__empty" classes when render coupon lis
diff --git a/packages/vant/src/tabs/Tabs.tsx b/packages/vant/src/tabs/Tabs.tsx
index f32cfc06b..e8e87d63d 100644
--- a/packages/vant/src/tabs/Tabs.tsx
+++ b/packages/vant/src/tabs/Tabs.tsx
@@ -230,7 +230,14 @@ export default defineComponent({
const newName = getTabName(newTab, newIndex);
const shouldEmitChange = state.currentIndex !== null;
- state.currentIndex = newIndex;
+ if (state.currentIndex !== newIndex) {
+ state.currentIndex = newIndex;
+
+ if (!skipScrollIntoView) {
+ scrollIntoView();
+ }
+ setLine();
+ }
if (newName !== props.active) {
emit('update:active', newName);
@@ -240,11 +247,6 @@ export default defineComponent({
}
}
- if (!skipScrollIntoView) {
- scrollIntoView();
- }
- setLine();
-
// scroll to correct position
if (stickyFixed && !props.scrollspy) {
setRootScrollTop(