mirror of
https://github.com/jekip/naive-ui-admin.git
synced 2026-03-01 00:23:11 +08:00
fix tagsview
This commit is contained in:
@@ -46,16 +46,16 @@ export const useTabsViewStore = defineStore({
|
|||||||
closeLeftTabs(route) {
|
closeLeftTabs(route) {
|
||||||
// 关闭左侧
|
// 关闭左侧
|
||||||
const index = this.tabsList.findIndex((item) => item.fullPath == route.fullPath);
|
const index = this.tabsList.findIndex((item) => item.fullPath == route.fullPath);
|
||||||
this.tabsList.splice(0, index);
|
this.tabsList = this.tabsList.filter((item, i) => i >= index || (item?.meta?.affix ?? false));
|
||||||
},
|
},
|
||||||
closeRightTabs(route) {
|
closeRightTabs(route) {
|
||||||
// 关闭右侧
|
// 关闭右侧
|
||||||
const index = this.tabsList.findIndex((item) => item.fullPath == route.fullPath);
|
const index = this.tabsList.findIndex((item) => item.fullPath == route.fullPath);
|
||||||
this.tabsList.splice(index + 1);
|
this.tabsList = this.tabsList.filter((item, i) => i <= index || (item?.meta?.affix ?? false));
|
||||||
},
|
},
|
||||||
closeOtherTabs(route) {
|
closeOtherTabs(route) {
|
||||||
// 关闭其他
|
// 关闭其他
|
||||||
this.tabsList = this.tabsList.filter((item) => item.fullPath == route.fullPath);
|
this.tabsList = this.tabsList.filter((item) => item.fullPath == route.fullPath || (item?.meta?.affix ?? false));
|
||||||
},
|
},
|
||||||
closeCurrentTab(route) {
|
closeCurrentTab(route) {
|
||||||
// 关闭当前页
|
// 关闭当前页
|
||||||
|
|||||||
Reference in New Issue
Block a user