Skip to content

Commit

Permalink
fix(Tab): fail to init in some cases (youzan#6101)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Apr 20, 2020
1 parent 4dc4239 commit 58aa20c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/tab/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
},
Expand Down

0 comments on commit 58aa20c

Please sign in to comment.