This commit is contained in:
yanran200730
2023-03-01 14:17:31 +08:00

View File

@@ -257,6 +257,14 @@ export const logs = {
clearOtherPages(state) { clearOtherPages(state) {
const id = location.href?.replace(location.origin, "") const id = location.href?.replace(location.origin, "")
state.pages = state.pages.filter(e => e.id == id) || [] state.pages = state.pages.filter(e => e.id == id) || []
},
setPageTitle(state, title) {
const id = location.href?.replace(location.origin, "")
state.pages.map(e => {
if (e.id == id) {
e.label = title
}
})
} }
}, },
actions: { actions: {