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