mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-25 05:50:18 +08:00
feat(projects): 添加生产的主题配置缓存
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
import type { Router, RouteLocationNormalizedLoaded } from 'vue-router';
|
||||
import { defineStore } from 'pinia';
|
||||
import { useRouterPush } from '@/composables';
|
||||
import { getTabRoutes, clearTabRoutes } from '@/utils';
|
||||
import { useThemeStore } from '../theme';
|
||||
import { getTabRouteByVueRoute, isInTabRoutes, getIndexInTabRoutes, getIndexInTabRoutesByRouteName } from './helpers';
|
||||
import {
|
||||
getTabRouteByVueRoute,
|
||||
isInTabRoutes,
|
||||
getIndexInTabRoutes,
|
||||
getIndexInTabRoutesByRouteName,
|
||||
setTabRoutes,
|
||||
getTabRoutes,
|
||||
clearTabRoutes
|
||||
} from './helpers';
|
||||
|
||||
interface TabState {
|
||||
/** 多页签数据 */
|
||||
@@ -43,6 +50,10 @@ export const useTabStore = defineStore('tab-store', {
|
||||
clearTabRoutes();
|
||||
this.$reset();
|
||||
},
|
||||
/** 缓存页签路由数据 */
|
||||
cacheTabRoutes() {
|
||||
setTabRoutes(this.tabs);
|
||||
},
|
||||
/**
|
||||
* 设置当前路由对应的页签为激活状态
|
||||
* @param fullPath - 路由fullPath
|
||||
|
||||
Reference in New Issue
Block a user