refactor: tabs

This commit is contained in:
xiaoxian521
2021-11-25 21:30:44 +08:00
parent d79e63f673
commit aca6a667f3
3 changed files with 22 additions and 0 deletions

View 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);
}