[fix]:修复tabs在初始化的时候active的值被tabs的默认值给覆盖掉的问题 (#3874)

This commit is contained in:
HadesZ 2020-12-18 14:56:03 +08:00 committed by GitHub
parent 405bd9d253
commit f321e202f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,7 @@ VantComponent({
this.children.length > data.swipeThreshold || !data.ellipsis, this.children.length > data.swipeThreshold || !data.ellipsis,
}); });
this.setCurrentIndexByName(this.getCurrentName() || data.active); this.setCurrentIndexByName(data.active || this.getCurrentName());
}, },
trigger(eventName: string, child?: TrivialInstance) { trigger(eventName: string, child?: TrivialInstance) {