Skip to content

Commit 03d1233

Browse files
committed
fix: multi-tabs close the last tab content redraw. #94
1 parent 2f436d2 commit 03d1233

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/MultiTab/MultiTab.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ export default {
3333
this[action](targetKey)
3434
},
3535
remove (targetKey) {
36-
if (this.pages.length === 1) {
37-
return
38-
}
3936
this.pages = this.pages.filter(page => page.fullPath !== targetKey)
4037
this.fullPathList = this.fullPathList.filter(path => path !== targetKey)
38+
// 跳转到最后一个还存在的标签页
39+
this.activeKey = this.fullPathList[this.fullPathList.length - 1]
4140
}
4241
},
4342
watch: {

0 commit comments

Comments
 (0)