fix: 关闭最后一个标签页时报错
通过 v-for 生成标签页列表,不用 ViewUI 自带关闭,而是手动关闭最后一个标签页时,出现 TypeError: Cannot read property 'disabled' of undefined 异常。
This commit is contained in:
parent
8a994e63bf
commit
be887de7b6
1 changed files with 1 additions and 1 deletions
|
@ -292,7 +292,7 @@
|
|||
setTimeout(() => this.transitioning = false, transitionTime);
|
||||
|
||||
const nav = this.navList[index];
|
||||
if (nav.disabled) return;
|
||||
if (!nav || nav.disabled) return;
|
||||
this.activeKey = nav.name;
|
||||
this.$emit('input', nav.name);
|
||||
this.$emit('on-click', nav.name);
|
||||
|
|
Loading…
Add table
Reference in a new issue