diff --git a/src/components/ConfigGlobal/src/ConfigGlobal.vue b/src/components/ConfigGlobal/src/ConfigGlobal.vue index 189e6eb44..985d5dfbb 100644 --- a/src/components/ConfigGlobal/src/ConfigGlobal.vue +++ b/src/components/ConfigGlobal/src/ConfigGlobal.vue @@ -13,7 +13,7 @@ const { variables } = useDesign() const appStore = useAppStore() const props = defineProps({ - size: propTypes.oneOf(['default', 'small', 'large']).def('default') + size: propTypes.oneOf(['default', 'small', 'large']).def('default') }) provide('configGlobal', props) diff --git a/src/components/SizeDropdown/src/SizeDropdown.vue b/src/components/SizeDropdown/src/SizeDropdown.vue index f7b1e8889..773ad620a 100644 --- a/src/components/SizeDropdown/src/SizeDropdown.vue +++ b/src/components/SizeDropdown/src/SizeDropdown.vue @@ -20,7 +20,7 @@ const appStore = useAppStore() const sizeMap = computed(() => appStore.sizeMap) -const setCurrentSize = (size: ElememtPlusSzie) => { +const setCurrentSize = (size: ElememtPlusSize) => { appStore.setCurrentSize(size) } diff --git a/src/config/app.ts b/src/config/app.ts index 3b2c6f23e..e4d2aadbc 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -39,8 +39,8 @@ export interface AppState { title: string userInfo: string isDark: boolean - currentSize: ElememtPlusSzie - sizeMap: ElememtPlusSzie[] + currentSize: ElememtPlusSize + sizeMap: ElememtPlusSize[] mobile: boolean footer: boolean theme: ThemeTypes diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index c6fac4e41..8f00ed189 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -69,10 +69,10 @@ export const useAppStore = defineStore({ getIsDark(): boolean { return this.isDark }, - getCurrentSize(): ElememtPlusSzie { + getCurrentSize(): ElememtPlusSize { return this.currentSize }, - getSizeMap(): ElememtPlusSzie[] { + getSizeMap(): ElememtPlusSize[] { return this.sizeMap }, getMobile(): boolean { @@ -150,7 +150,7 @@ export const useAppStore = defineStore({ } wsCache.set('isDark', this.isDark) }, - setCurrentSize(currentSize: ElememtPlusSzie) { + setCurrentSize(currentSize: ElememtPlusSize) { this.currentSize = currentSize wsCache.set('currentSize', this.currentSize) }, diff --git a/types/componentType/configGlobal.d.ts b/types/componentType/configGlobal.d.ts index ba13256c3..6a0bb1a73 100644 --- a/types/componentType/configGlobal.d.ts +++ b/types/componentType/configGlobal.d.ts @@ -1,3 +1,3 @@ declare interface ConfigGlobalTypes { - size?: ElememtPlusSzie + size?: ElememtPlusSize } diff --git a/types/global.d.ts b/types/global.d.ts index dfcb44ab2..28bb924a7 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -6,7 +6,7 @@ declare type Nullable = T | null declare type ElRef = Nullable -declare type ElememtPlusSzie = 'default' | 'small' | 'large' +declare type ElememtPlusSize = 'default' | 'small' | 'large' declare type ElementPlusInfoType = 'success' | 'info' | 'warning' | 'danger'