Unverified Commit 03d12334 by Sendya

fix: multi-tabs close the last tab content redraw. #94

parent 2f436d28
...@@ -33,11 +33,10 @@ export default { ...@@ -33,11 +33,10 @@ export default {
this[action](targetKey) this[action](targetKey)
}, },
remove (targetKey) { remove (targetKey) {
if (this.pages.length === 1) {
return
}
this.pages = this.pages.filter(page => page.fullPath !== targetKey) this.pages = this.pages.filter(page => page.fullPath !== targetKey)
this.fullPathList = this.fullPathList.filter(path => path !== targetKey) this.fullPathList = this.fullPathList.filter(path => path !== targetKey)
// 跳转到最后一个还存在的标签页
this.activeKey = this.fullPathList[this.fullPathList.length - 1]
} }
}, },
watch: { watch: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment