|
|
@@ -5,7 +5,7 @@ import { storage } from '@/utils/Storage';
|
|
|
import { TABS_ROUTES } from '@/store/mutation-types';
|
|
|
|
|
|
// 不需要出现在标签页中的路由
|
|
|
-const whiteList = ['Redirect', 'Login'];
|
|
|
+const whiteList = ['Redirect', 'Login', 'StayTune'];
|
|
|
|
|
|
export type RouteItem = Partial<RouteLocationNormalized> & {
|
|
|
fullPath: string;
|
|
|
@@ -40,9 +40,7 @@ function filterNewTabs(sliceTabs: any[], tabsList: any[], activeKey = '') {
|
|
|
pathList.push(item.fullPath);
|
|
|
}
|
|
|
}
|
|
|
- return tabsList.filter(
|
|
|
- (item) => item.fullPath === activeKey || !pathList.includes(item.fullPath),
|
|
|
- );
|
|
|
+ return tabsList.filter((item) => item.fullPath === activeKey || !pathList.includes(item.fullPath));
|
|
|
}
|
|
|
|
|
|
export const useTabsViewStore = defineStore({
|
|
|
@@ -112,8 +110,7 @@ export const useTabsViewStore = defineStore({
|
|
|
// 关闭其他
|
|
|
closeOtherTabs(route, activeKey) {
|
|
|
const newTabsList = this.tabsList.filter(
|
|
|
- (item) =>
|
|
|
- ([route.value.fullPath, activeKey].includes(item.fullPath) || item?.meta?.affix) ?? false,
|
|
|
+ (item) => ([route.value.fullPath, activeKey].includes(item.fullPath) || item?.meta?.affix) ?? false,
|
|
|
);
|
|
|
this.delKeepAliveNames(newTabsList);
|
|
|
this.tabsList = newTabsList;
|