fix(projects): fix repeat home tab

This commit is contained in:
Soybean
2024-03-02 11:08:14 +08:00
parent a17d68eb11
commit bccd6cb3c3
2 changed files with 11 additions and 7 deletions

View File

@ -9,7 +9,7 @@ import { localStg } from '@/utils/storage';
import { useRouteStore } from '@/store/modules/route';
import { useThemeStore } from '../theme';
import {
filterTabsByAllRoutes,
extractTabsByAllRoutes,
filterTabsById,
filterTabsByIds,
findTabByRouteName,
@ -63,8 +63,8 @@ export const useTabStore = defineStore(SetupStoreId.Tab, () => {
const storageTabs = localStg.get('globalTabs');
if (themeStore.tab.cache && storageTabs) {
const filteredTabs = filterTabsByAllRoutes(router, storageTabs);
tabs.value = updateTabsByI18nKey(filteredTabs);
const extractedTabs = extractTabsByAllRoutes(router, storageTabs);
tabs.value = updateTabsByI18nKey(extractedTabs);
}
addTab(currentRoute);