Tabs: fix 路由切换导致实例丢失的问题

pull/22452/head
sunguo 2023-03-18 17:48:16 +08:00
parent f14b5ba540
commit e4d01d92ab
1 changed files with 2 additions and 2 deletions

View File

@ -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');