mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-07 17:07:19 +08:00
chore: update
This commit is contained in:
parent
99be7583c1
commit
d8fa088d66
@ -62,7 +62,7 @@ const topPath = getTopMenu()?.path;
|
||||
const { VITE_HIDE_HOME } = import.meta.env;
|
||||
const fixedTags = [
|
||||
...routerArrays,
|
||||
...usePermissionStoreHook().tagLists.filter(v => v?.meta?.fixedTag)
|
||||
...usePermissionStoreHook().flatteningRoutes.filter(v => v?.meta?.fixedTag)
|
||||
];
|
||||
|
||||
const dynamicTagView = async () => {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { store } from "@/store";
|
||||
import { usePermissionStoreHook } from "./permission";
|
||||
import { routerArrays } from "@/layout/types";
|
||||
import { usePermissionStoreHook } from "./permission";
|
||||
import { responsiveStorageNameSpace } from "@/config";
|
||||
import type { multiType, positionType } from "./types";
|
||||
import { isEqual, isBoolean, isUrl, storageLocal } from "@pureadmin/utils";
|
||||
@ -18,7 +18,9 @@ export const useMultiTagsStore = defineStore({
|
||||
)
|
||||
: [
|
||||
...routerArrays,
|
||||
...usePermissionStoreHook().tagLists.filter(v => v?.meta?.fixedTag)
|
||||
...usePermissionStoreHook().flatteningRoutes.filter(
|
||||
v => v?.meta?.fixedTag
|
||||
)
|
||||
],
|
||||
multiTagsCache: storageLocal().getItem<StorageConfigs>(
|
||||
`${responsiveStorageNameSpace()}configure`
|
||||
|
@ -18,7 +18,8 @@ export const usePermissionStore = defineStore({
|
||||
constantMenus,
|
||||
// 整体路由生成的菜单(静态、动态)
|
||||
wholeMenus: [],
|
||||
tagLists: [],
|
||||
// 整体路由(一维数组格式)
|
||||
flatteningRoutes: [],
|
||||
// 缓存页面keepAlive
|
||||
cachePageList: []
|
||||
}),
|
||||
@ -28,7 +29,9 @@ export const usePermissionStore = defineStore({
|
||||
this.wholeMenus = filterNoPermissionTree(
|
||||
filterTree(ascending(this.constantMenus.concat(routes)))
|
||||
);
|
||||
this.tagLists = formatFlatteningRoutes(this.constantMenus.concat(routes));
|
||||
this.flatteningRoutes = formatFlatteningRoutes(
|
||||
this.constantMenus.concat(routes)
|
||||
);
|
||||
},
|
||||
cacheOperate({ mode, name }: cacheType) {
|
||||
const delIndex = this.cachePageList.findIndex(v => v === name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user