fix(select): global dropdownMatchSelectWidth not work in select

pull/8183/head
Windson97 2025-05-19 16:23:55 +08:00 committed by GitHub
parent aa211fd789
commit 6f8ffaff7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -142,6 +142,7 @@ const Select = defineComponent({
getPopupContainer,
disabled,
select,
dropdownMatchSelectWidth: configDropdownMatchSelectWidth,
} = useConfigInject('select', props);
const { compactSize, compactItemClassnames } = useCompactItemContext(prefixCls, direction);
const mergedSize = computed(() => compactSize.value || contextSize.value);
@ -266,9 +267,9 @@ const Select = defineComponent({
<RcSelect
ref={selectRef}
virtual={virtual}
dropdownMatchSelectWidth={dropdownMatchSelectWidth}
{...selectProps}
{...attrs}
dropdownMatchSelectWidth={dropdownMatchSelectWidth ?? configDropdownMatchSelectWidth.value}
showSearch={props.showSearch ?? select?.value?.showSearch}
placeholder={placeholder}
listHeight={listHeight}