feat: type抽离

This commit is contained in:
hongxinzz
2022-10-09 17:12:03 +08:00
parent a62929a8da
commit 8b4fa1aa21
62 changed files with 223 additions and 172 deletions

View File

@@ -5,6 +5,7 @@ import { appModules } from '@/config/app'
import type { AppState, LayoutType, ThemeTypes } from '@/config/app'
import { setCssVar, humpToUnderline } from '@/utils'
import { ElMessage } from 'element-plus'
import { ElementPlusSize } from '@/types/elementPlus'
const { wsCache } = useCache()
@@ -72,10 +73,10 @@ export const useAppStore = defineStore({
getIsDark(): boolean {
return this.isDark
},
getCurrentSize(): ElememtPlusSize {
getCurrentSize(): ElementPlusSize {
return this.currentSize
},
getSizeMap(): ElememtPlusSize[] {
getSizeMap(): ElementPlusSize[] {
return this.sizeMap
},
getMobile(): boolean {
@@ -157,7 +158,7 @@ export const useAppStore = defineStore({
}
wsCache.set('isDark', this.isDark)
},
setCurrentSize(currentSize: ElememtPlusSize) {
setCurrentSize(currentSize: ElementPlusSize) {
this.currentSize = currentSize
wsCache.set('currentSize', this.currentSize)
},

View File

@@ -3,6 +3,7 @@ import { store } from '../index'
import { useCache } from '@/hooks/web/useCache'
import { localeModules, elLocaleMap } from '@/config/locale'
import type { LocaleState } from '@/config/locale'
import { LocaleDropdownType } from '@/types/localeDropdown'
const { wsCache } = useCache()