调整一下

This commit is contained in:
aixianling
2023-02-02 14:33:12 +08:00
parent 51185a43ee
commit 05453ed16d

View File

@@ -51,7 +51,7 @@ export default {
const {pages} = this.logs const {pages} = this.logs
if (id == this.currentTab) { if (id == this.currentTab) {
const index = pages.findIndex(e => e.id == id) const index = pages.findIndex(e => e.id == id)
const next = pages?.[index + 1] || pages?.[index - 1] || {name: '/'} const next = pages?.[index + 1] || pages?.[index - 1] || {name: this.fixed.id || "/"}
this.handleTabClick(next) this.handleTabClick(next)
} }
this.deletePage(id) this.deletePage(id)
@@ -61,7 +61,7 @@ export default {
}, },
handleOpt(v) { handleOpt(v) {
this.$store.commit(v) this.$store.commit(v)
v == "clearAllPages" && this.handleTabClick({name: '/'}) v == "clearAllPages" && this.handleTabClick({name: this.fixed.id || "/"})
} }
} }
} }