页签历史驻留,返回关闭功能完成
This commit is contained in:
@@ -234,13 +234,29 @@ export const wxwork = {
|
||||
*/
|
||||
export const logs = {
|
||||
state: () => ({
|
||||
closeIntro: []
|
||||
closeIntro: [], pages: []
|
||||
}),
|
||||
mutations: {
|
||||
addCloseIntro(state, app) {
|
||||
state.closeIntro.push(app)
|
||||
}
|
||||
},
|
||||
addPage(state, page) {
|
||||
const id = location.href?.replace(location.origin, "")
|
||||
if (!state.pages.find(e => e.id == id || e.id == page.id)) {
|
||||
state.pages.push({...page, id})
|
||||
}
|
||||
},
|
||||
deletePage(state, id) {
|
||||
id = id || location.href?.replace(location.origin, "")
|
||||
const i = state.pages.findIndex(e => e.id == id)
|
||||
i > -1 && state.pages.splice(i, 1)
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
closePage({commit}, id) {
|
||||
return commit("deletePage", id)
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 流程信息
|
||||
|
||||
Reference in New Issue
Block a user