|
|
@ -17,6 +17,7 @@ const navs = { |
|
|
|
state.tagList.push(action); |
|
|
|
state.tagList.push(action); |
|
|
|
setStore({ name: 'tagList', content: state.tagList }); |
|
|
|
setStore({ name: 'tagList', content: state.tagList }); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 关闭指定标签
|
|
|
|
DEL_TAG: (state, action) => { |
|
|
|
DEL_TAG: (state, action) => { |
|
|
|
state.tagList = state.tagList.filter(item => { |
|
|
|
state.tagList = state.tagList.filter(item => { |
|
|
|
return item.fullPath !== action.fullPath; |
|
|
|
return item.fullPath !== action.fullPath; |
|
|
@ -27,6 +28,7 @@ const navs = { |
|
|
|
state.tagList = tagList; |
|
|
|
state.tagList = tagList; |
|
|
|
setStore({ name: 'tagList', content: state.tagList }); |
|
|
|
setStore({ name: 'tagList', content: state.tagList }); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 关闭除了当前页面的所有页面
|
|
|
|
DEL_TAG_OTHER: state => { |
|
|
|
DEL_TAG_OTHER: state => { |
|
|
|
state.tagList = state.tagList.filter(item => { |
|
|
|
state.tagList = state.tagList.filter(item => { |
|
|
|
console.log("关闭其他111state.tag.fullPath, website.fistPage.path",state.tag.fullPath, website.fistPage.path,item); |
|
|
|
console.log("关闭其他111state.tag.fullPath, website.fistPage.path",state.tag.fullPath, website.fistPage.path,item); |
|
|
@ -35,6 +37,7 @@ const navs = { |
|
|
|
console.log("2222state.tagList",state.tagList); |
|
|
|
console.log("2222state.tagList",state.tagList); |
|
|
|
setStore({ name: 'tagList', content: state.tagList }); |
|
|
|
setStore({ name: 'tagList', content: state.tagList }); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 关闭当前页面
|
|
|
|
DEL_TAG_CURRENT: state => { |
|
|
|
DEL_TAG_CURRENT: state => { |
|
|
|
state.tagList = state.tagList.filter(item => { |
|
|
|
state.tagList = state.tagList.filter(item => { |
|
|
|
console.log("state.tag.fullPath, website.fistPage.path",state.tag.fullPath, website.fistPage.path,item); |
|
|
|
console.log("state.tag.fullPath, website.fistPage.path",state.tag.fullPath, website.fistPage.path,item); |
|
|
|