更优雅的变更页签标题
This commit is contained in:
@@ -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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user