mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
refactor: tabs
This commit is contained in:
parent
d79e63f673
commit
aca6a667f3
@ -3,6 +3,7 @@
|
|||||||
"Title": "PureAdmin",
|
"Title": "PureAdmin",
|
||||||
"FixedHeader": true,
|
"FixedHeader": true,
|
||||||
"HiddenSideBar": false,
|
"HiddenSideBar": false,
|
||||||
|
"MultiTabsCache": false,
|
||||||
"KeepAlive": true,
|
"KeepAlive": true,
|
||||||
"Locale": "zh",
|
"Locale": "zh",
|
||||||
"Layout": "vertical",
|
"Layout": "vertical",
|
||||||
|
20
src/store/modules/multiTabs.ts
Normal file
20
src/store/modules/multiTabs.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import { defineStore } from "pinia";
|
||||||
|
import { store } from "/@/store";
|
||||||
|
import { getConfig } from "/@/config";
|
||||||
|
|
||||||
|
export const useMultiTabsStore = defineStore({
|
||||||
|
id: "pure-multiTabs",
|
||||||
|
state: () => ({
|
||||||
|
multiTabsCache: getConfig().MultiTabsCache
|
||||||
|
}),
|
||||||
|
getters: {
|
||||||
|
getMultiTabsCache() {
|
||||||
|
return this.multiTabsCache;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
actions: {}
|
||||||
|
});
|
||||||
|
|
||||||
|
export function useMultiTabsStoreHook() {
|
||||||
|
return useMultiTabsStore(store);
|
||||||
|
}
|
1
types/global.d.ts
vendored
1
types/global.d.ts
vendored
@ -87,6 +87,7 @@ declare global {
|
|||||||
Title?: string;
|
Title?: string;
|
||||||
FixedHeader?: boolean;
|
FixedHeader?: boolean;
|
||||||
HiddenSideBar?: boolean;
|
HiddenSideBar?: boolean;
|
||||||
|
MultiTabsCache?: boolean;
|
||||||
KeepAlive?: boolean;
|
KeepAlive?: boolean;
|
||||||
Locale?: string;
|
Locale?: string;
|
||||||
Layout?: string;
|
Layout?: string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user