页面tab完成

This commit is contained in:
aixianling
2023-02-02 12:00:12 +08:00
parent e45f6ee040
commit 51185a43ee
2 changed files with 60 additions and 7 deletions

View File

@@ -251,6 +251,13 @@ export const logs = {
const i = state.pages.findIndex(e => e.id == id)
i > -1 && state.pages.splice(i, 1)
},
clearAllPages(state) {
state.pages = []
},
clearOtherPages(state) {
const id = location.href?.replace(location.origin, "")
state.pages = state.pages.filter(e => e.id == id) || []
}
},
actions: {
closePage({commit}, id) {