refactor: state类型声明移动至types目录下

This commit is contained in:
郝先瑞
2022-03-20 23:46:03 +08:00
parent c77e8878fa
commit 518104e269
19 changed files with 78 additions and 78 deletions

View File

@@ -1,9 +1,9 @@
import {AppState} from "@/store/interface";
import {localStorage} from "@/utils/storage";
import {defineStore} from "pinia";
import { AppState } from "@/types";
import { localStorage } from "@/utils/storage";
import { defineStore } from "pinia";
import { getLanguage } from '@/lang/index'
const useAppStore = defineStore({
const useAppStore = defineStore({
id: "app",
state: (): AppState => ({
device: 'desktop',
@@ -12,7 +12,7 @@ import { getLanguage } from '@/lang/index'
withoutAnimation: false
},
language: getLanguage(),
size: localStorage.get('size')||'default'
size: localStorage.get('size') || 'default'
}),
actions: {
toggleSidebar() {