fix: comp size

pull/31/head
xingyu 2023-08-12 17:04:48 +08:00
parent 7d0bcf6a48
commit db7b7cd047
2 changed files with 5 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import 'dayjs/locale/zh-cn'
import { ConfigProvider } from 'ant-design-vue'
import { storeToRefs } from 'pinia'
import { computed } from 'vue'
import { AppProvider } from '@/components/Application'
import { useTitle } from '@/hooks/web/useTitle'
import { useLocale } from '@/locales/useLocale'
@ -13,12 +14,14 @@ import { useAppStore } from '@/store/modules/app'
const { getAntdLocale } = useLocale()
const appStore = useAppStore()
const { themeConfig } = storeToRefs(appStore)
const componentSize = computed(() => appStore.getComponentSize)
// Listening to page changes and dynamically changing site titles
useTitle()
</script>
<template>
<ConfigProvider :locale="getAntdLocale" :theme="themeConfig">
<ConfigProvider :locale="getAntdLocale" :theme="themeConfig" :component-size="componentSize">
<AppProvider>
<RouterView />
</AppProvider>

View File

@ -41,7 +41,7 @@ export const basicProps = {
autoSubmitOnEnter: propTypes.bool.def(false),
submitOnReset: propTypes.bool,
submitOnChange: propTypes.bool,
size: propTypes.oneOf(['default', 'small', 'large']).def('default'),
size: propTypes.oneOf(['default', 'small', 'large']),
// 禁用表单
disabled: propTypes.bool,
emptySpan: {