mirror of https://github.com/ElemeFE/element
Tabs: fix 路由切换导致实例丢失的问题
parent
f14b5ba540
commit
e4d01d92ab
|
@ -47,7 +47,7 @@
|
|||
if (this.$refs.nav) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.nav.$nextTick(_ => {
|
||||
this.$refs.nav.scrollToActiveTab();
|
||||
this.$refs.nav && this.$refs.nav.scrollToActiveTab();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -171,7 +171,7 @@
|
|||
</div>
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
created() {
|
||||
if (!this.currentName) {
|
||||
this.setCurrentName('0');
|
||||
|
|
Loading…
Reference in New Issue