From 83e994eee0a097d6dcd66c35398878d3280fe41a Mon Sep 17 00:00:00 2001 From: bqy_fe <1743369777@qq.com> Date: Wed, 11 May 2022 02:31:45 +0800 Subject: [PATCH] fix(select): use the size of the --- components/select/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/select/index.tsx b/components/select/index.tsx index 99e450f31d..4275c54133 100644 --- a/components/select/index.tsx +++ b/components/select/index.tsx @@ -106,15 +106,18 @@ const Select = defineComponent({ return mode; }); - const { prefixCls, direction, configProvider, getPrefixCls } = useConfigInject('select', props); + const { prefixCls, direction, configProvider, size, getPrefixCls } = useConfigInject( + 'select', + props, + ); const rootPrefixCls = computed(() => getPrefixCls()); const transitionName = computed(() => getTransitionName(rootPrefixCls.value, 'slide-up', props.transitionName), ); const mergedClassName = computed(() => classNames({ - [`${prefixCls.value}-lg`]: props.size === 'large', - [`${prefixCls.value}-sm`]: props.size === 'small', + [`${prefixCls.value}-lg`]: size.value === 'large', + [`${prefixCls.value}-sm`]: size.value === 'small', [`${prefixCls.value}-rtl`]: direction.value === 'rtl', [`${prefixCls.value}-borderless`]: !props.bordered, }),