|
|
|
@ -44,7 +44,13 @@ const mutations = {
|
|
|
|
|
state.tabList.push(tab);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
closeTab: (state, { index, reverse }) => {
|
|
|
|
|
closeTab: (state, { index, reverse, current }) => {
|
|
|
|
|
if (current) {
|
|
|
|
|
state.tabList.splice(
|
|
|
|
|
state.tabList.findIndex((item) => item.name === state.activeTab),
|
|
|
|
|
1
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
if (typeof index === 'undefined') {
|
|
|
|
|
state.tabList.splice(1);
|
|
|
|
|
} else {
|
|
|
|
@ -57,6 +63,7 @@ const mutations = {
|
|
|
|
|
router.push(state.tabList[Math.min(index, state.tabList.length - 1)].fullPath);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
setActiveTab: (state, data) => (state.activeTab = data),
|
|
|
|
|
setBreakcrumbList: (state, data) => (state.breakcrumbList = data),
|
|
|
|
|