mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
fix(components): [select & select-v2] status-icon is invalid (#18101)
fix(components): [select & select-v2] The check result icon is still displayed when status-icon is false Co-authored-by: 蓝桥春雪 <yj.wang3@sinitek.com>
This commit is contained in:
parent
a9e6345464
commit
62bade4fda
@ -229,7 +229,7 @@
|
||||
<component :is="clearIcon" />
|
||||
</el-icon>
|
||||
<el-icon
|
||||
v-if="validateState && validateIcon"
|
||||
v-if="validateState && validateIcon && needStatusIcon"
|
||||
:class="[nsInput.e('icon'), nsInput.e('validateIcon')]"
|
||||
>
|
||||
<component :is="validateIcon" />
|
||||
|
@ -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,
|
||||
|
@ -229,7 +229,7 @@
|
||||
<component :is="clearIcon" />
|
||||
</el-icon>
|
||||
<el-icon
|
||||
v-if="validateState && validateIcon"
|
||||
v-if="validateState && validateIcon && needStatusIcon"
|
||||
:class="[nsInput.e('icon'), nsInput.e('validateIcon')]"
|
||||
>
|
||||
<component :is="validateIcon" />
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user