update Tabs

This commit is contained in:
梁灏 2017-03-23 11:03:43 +08:00
parent 8948742c75
commit 087ad37d3f
2 changed files with 19 additions and 54 deletions

View file

@ -181,7 +181,7 @@
handleRemove (index) {
const tabs = this.getTabs();
const tab = tabs[index];
tab.$destroy(true);
tab.$destroy();
if (tab.currentName === this.activeKey) {
const newTabs = this.getTabs();
@ -200,6 +200,7 @@
}
}
this.activeKey = activeKey;
this.$emit('input', activeKey);
}
this.$emit('on-tab-remove', tab.currentName);
this.updateNav();