feat(projects): new router system [新的路由系统]

This commit is contained in:
Soybean
2022-11-08 01:14:59 +08:00
parent 40c1e13b50
commit c7b6a3fbec
54 changed files with 1328 additions and 759 deletions

View File

@ -14,9 +14,9 @@ import {
interface TabState {
/** 多页签数据 */
tabs: GlobalTabRoute[];
tabs: App.GlobalTabRoute[];
/** 多页签首页 */
homeTab: GlobalTabRoute;
homeTab: App.GlobalTabRoute;
/** 当前激活状态的页签(路由fullPath) */
activeTab: string;
}
@ -213,7 +213,7 @@ export const useTabStore = defineStore('tab-store', {
iniTabStore(currentRoute: RouteLocationNormalizedLoaded) {
const theme = useThemeStore();
const tabs: GlobalTabRoute[] = theme.tab.isCache ? getTabRoutes() : [];
const tabs: App.GlobalTabRoute[] = theme.tab.isCache ? getTabRoutes() : [];
const hasHome = getIndexInTabRoutesByRouteName(tabs, this.homeTab.name as string) > -1;
if (!hasHome && this.homeTab.name !== 'root') {