diff --git a/packages/components/select-v2/src/select.vue b/packages/components/select-v2/src/select.vue index d86a0ee3bf..d66f8bf892 100644 --- a/packages/components/select-v2/src/select.vue +++ b/packages/components/select-v2/src/select.vue @@ -229,7 +229,7 @@ diff --git a/packages/components/select-v2/src/useSelect.ts b/packages/components/select-v2/src/useSelect.ts index 7b8c0bb9b6..2187edf9fe 100644 --- a/packages/components/select-v2/src/useSelect.ts +++ b/packages/components/select-v2/src/useSelect.ts @@ -135,6 +135,8 @@ const useSelect = (props: ISelectV2Props, emit: SelectEmitFn) => { const selectDisabled = computed(() => props.disabled || elForm?.disabled) + const needStatusIcon = computed(() => elForm?.statusIcon ?? false) + const popupHeight = computed(() => { const totalHeight = filteredOptions.value.length * props.itemHeight return totalHeight > props.height ? props.height : totalHeight @@ -913,6 +915,7 @@ const useSelect = (props: ISelectV2Props, emit: SelectEmitFn) => { shouldShowPlaceholder, selectDisabled, selectSize, + needStatusIcon, showClearBtn, states, isFocused, diff --git a/packages/components/select/src/select.vue b/packages/components/select/src/select.vue index 5dfdd1a19e..303415171a 100644 --- a/packages/components/select/src/select.vue +++ b/packages/components/select/src/select.vue @@ -229,7 +229,7 @@ diff --git a/packages/components/select/src/useSelect.ts b/packages/components/select/src/useSelect.ts index 010981c38a..8aafb4186d 100644 --- a/packages/components/select/src/useSelect.ts +++ b/packages/components/select/src/useSelect.ts @@ -141,6 +141,8 @@ export const useSelect = (props: ISelectProps, emit) => { : !isEmptyValue(props.modelValue) }) + const needStatusIcon = computed(() => form?.statusIcon ?? false) + const showClose = computed(() => { return ( props.clearable && @@ -826,6 +828,7 @@ export const useSelect = (props: ISelectProps, emit) => { shouldShowPlaceholder, currentPlaceholder, mouseEnterEventName, + needStatusIcon, showClose, iconComponent, iconReverse,