mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): new storage system [新的本地数据存储系统]
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import type { RouteLocationNormalizedLoaded, Router } from 'vue-router';
|
||||
import { defineStore } from 'pinia';
|
||||
import { useRouterPush } from '@/composables';
|
||||
import { localStg } from '@/utils';
|
||||
import { useThemeStore } from '../theme';
|
||||
import {
|
||||
clearTabRoutes,
|
||||
@ -8,8 +9,7 @@ import {
|
||||
getIndexInTabRoutesByRouteName,
|
||||
getTabRouteByVueRoute,
|
||||
getTabRoutes,
|
||||
isInTabRoutes,
|
||||
setTabRoutes
|
||||
isInTabRoutes
|
||||
} from './helpers';
|
||||
|
||||
interface TabState {
|
||||
@ -52,7 +52,7 @@ export const useTabStore = defineStore('tab-store', {
|
||||
},
|
||||
/** 缓存页签路由数据 */
|
||||
cacheTabRoutes() {
|
||||
setTabRoutes(this.tabs);
|
||||
localStg.set('multiTabRoutes', this.tabs);
|
||||
},
|
||||
/**
|
||||
* 设置当前路由对应的页签为激活状态
|
||||
|
Reference in New Issue
Block a user