refactor: pinia整合优化重构

This commit is contained in:
郝先瑞
2022-03-11 00:07:34 +08:00
parent 7bd9d70433
commit 4ae629ab65
26 changed files with 675 additions and 563 deletions

View File

@@ -1,10 +1,9 @@
import {AppState} from "@/store/interface";
import {localStorage} from "@/utils/storage";
import {store} from "@/store";
import {defineStore} from "pinia";
import { getLanguage } from '@/lang/index'
export const useAppStore = defineStore({
const useAppStore = defineStore({
id: "app",
state: (): AppState => ({
device: 'desktop',
@@ -44,6 +43,4 @@ export const useAppStore = defineStore({
}
})
export function useAppStoreHook() {
return useAppStore(store);
}
export default useAppStore;