From cae9ef17b8da335bb07697f014b99475e1e151d9 Mon Sep 17 00:00:00 2001 From: kamesan012 <79386745+kamesan012@users.noreply.github.com> Date: Thu, 12 Oct 2023 08:14:38 +0800 Subject: [PATCH] fix(components): inline style doesn't use the custom sass setting value (#14117) * fix(components): inline style doesn't use the custom sass setting value closed #14038 * Update packages/components/select/src/useSelect.ts Co-authored-by: btea <2356281422@qq.com> * fix(components): update codes * fix(components): use ns.cssVarName('input-height') --------- Co-authored-by: btea <2356281422@qq.com> --- packages/components/select/src/useSelect.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/components/select/src/useSelect.ts b/packages/components/select/src/useSelect.ts index 9a3fd76cd8..0db82a159b 100644 --- a/packages/components/select/src/useSelect.ts +++ b/packages/components/select/src/useSelect.ts @@ -407,7 +407,11 @@ export const useSelect = (props, states: States, ctx) => { originClientHeight || (input.clientHeight > 0 ? input.clientHeight + 2 : 0) const _tags = tags.value - const gotSize = getComponentSize(selectSize.value || form?.size) + const cssVarOfSelectSize = getComputedStyle(input).getPropertyValue( + ns.cssVarName('input-height') + ) + const gotSize = + cssVarOfSelectSize || getComponentSize(selectSize.value || form?.size) const sizeInMap = selectSize.value ||