mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Tab): fail to init in some cases (#6101)
This commit is contained in:
parent
4dc423993d
commit
58aa20cd4e
@ -30,16 +30,16 @@ export default createComponent({
|
||||
},
|
||||
|
||||
isActive() {
|
||||
return this.computedName === this.parent.currentName;
|
||||
const active = this.computedName === this.parent.currentName;
|
||||
|
||||
if (active) {
|
||||
this.inited = true;
|
||||
}
|
||||
return active;
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
// eslint-disable-next-line object-shorthand
|
||||
'parent.currentIndex'() {
|
||||
this.inited = this.inited || this.isActive;
|
||||
},
|
||||
|
||||
title() {
|
||||
this.parent.setLine();
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user