diff --git a/packages/tabs/index.ts b/packages/tabs/index.ts index 072a48d6..3824e2fb 100644 --- a/packages/tabs/index.ts +++ b/packages/tabs/index.ts @@ -131,7 +131,7 @@ VantComponent({ this.children.length > data.swipeThreshold || !data.ellipsis, }); - this.setCurrentIndexByName(this.getCurrentName() || data.active); + this.setCurrentIndexByName(data.active || this.getCurrentName()); }, trigger(eventName: string, child?: TrivialInstance) {