|
@ -84,15 +84,14 @@
|
84
|
84
|
},
|
85
|
85
|
// tabs, 删除tab
|
86
|
86
|
removeTabHandle (tabName) {
|
87
|
|
var newTabs = this.mainTabs.filter(item => item.name !== tabName)
|
88
|
|
if (newTabs.length >= 1) {
|
|
87
|
this.mainTabs = this.mainTabs.filter(item => item.name !== tabName)
|
|
88
|
if (this.mainTabs.length >= 1) {
|
89
|
89
|
// 当前选中tab被删除
|
90
|
90
|
if (tabName === this.mainTabsActiveName) {
|
91
|
|
this.$router.push({ name: newTabs[newTabs.length - 1].name }, () => {
|
|
91
|
this.$router.push({ name: this.mainTabs[this.mainTabs.length - 1].name }, () => {
|
92
|
92
|
this.mainTabsActiveName = this.$route.name
|
93
|
93
|
})
|
94
|
94
|
}
|
95
|
|
this.mainTabs = newTabs
|
96
|
95
|
} else {
|
97
|
96
|
this.menuActiveName = ''
|
98
|
97
|
this.$router.push({ name: 'home' })
|