fix: fixed spelling 'ElememtPlusSzie'

This commit is contained in:
jinyang 2022-04-16 09:42:40 +08:00
parent 042f4e0416
commit 5dbbc60864
6 changed files with 9 additions and 9 deletions

View File

@ -13,7 +13,7 @@ const { variables } = useDesign()
const appStore = useAppStore() const appStore = useAppStore()
const props = defineProps({ const props = defineProps({
size: propTypes.oneOf<ElememtPlusSzie[]>(['default', 'small', 'large']).def('default') size: propTypes.oneOf<ElememtPlusSize[]>(['default', 'small', 'large']).def('default')
}) })
provide('configGlobal', props) provide('configGlobal', props)

View File

@ -20,7 +20,7 @@ const appStore = useAppStore()
const sizeMap = computed(() => appStore.sizeMap) const sizeMap = computed(() => appStore.sizeMap)
const setCurrentSize = (size: ElememtPlusSzie) => { const setCurrentSize = (size: ElememtPlusSize) => {
appStore.setCurrentSize(size) appStore.setCurrentSize(size)
} }
</script> </script>

View File

@ -39,8 +39,8 @@ export interface AppState {
title: string title: string
userInfo: string userInfo: string
isDark: boolean isDark: boolean
currentSize: ElememtPlusSzie currentSize: ElememtPlusSize
sizeMap: ElememtPlusSzie[] sizeMap: ElememtPlusSize[]
mobile: boolean mobile: boolean
footer: boolean footer: boolean
theme: ThemeTypes theme: ThemeTypes

View File

@ -69,10 +69,10 @@ export const useAppStore = defineStore({
getIsDark(): boolean { getIsDark(): boolean {
return this.isDark return this.isDark
}, },
getCurrentSize(): ElememtPlusSzie { getCurrentSize(): ElememtPlusSize {
return this.currentSize return this.currentSize
}, },
getSizeMap(): ElememtPlusSzie[] { getSizeMap(): ElememtPlusSize[] {
return this.sizeMap return this.sizeMap
}, },
getMobile(): boolean { getMobile(): boolean {
@ -150,7 +150,7 @@ export const useAppStore = defineStore({
} }
wsCache.set('isDark', this.isDark) wsCache.set('isDark', this.isDark)
}, },
setCurrentSize(currentSize: ElememtPlusSzie) { setCurrentSize(currentSize: ElememtPlusSize) {
this.currentSize = currentSize this.currentSize = currentSize
wsCache.set('currentSize', this.currentSize) wsCache.set('currentSize', this.currentSize)
}, },

View File

@ -1,3 +1,3 @@
declare interface ConfigGlobalTypes { declare interface ConfigGlobalTypes {
size?: ElememtPlusSzie size?: ElememtPlusSize
} }

2
types/global.d.ts vendored
View File

@ -6,7 +6,7 @@ declare type Nullable<T> = T | null
declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T> declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>
declare type ElememtPlusSzie = 'default' | 'small' | 'large' declare type ElememtPlusSize = 'default' | 'small' | 'large'
declare type ElementPlusInfoType = 'success' | 'info' | 'warning' | 'danger' declare type ElementPlusInfoType = 'success' | 'info' | 'warning' | 'danger'