mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +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" />
|
<component :is="clearIcon" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<el-icon
|
<el-icon
|
||||||
v-if="validateState && validateIcon"
|
v-if="validateState && validateIcon && needStatusIcon"
|
||||||
:class="[nsInput.e('icon'), nsInput.e('validateIcon')]"
|
:class="[nsInput.e('icon'), nsInput.e('validateIcon')]"
|
||||||
>
|
>
|
||||||
<component :is="validateIcon" />
|
<component :is="validateIcon" />
|
||||||
|
@ -135,6 +135,8 @@ const useSelect = (props: ISelectV2Props, emit: SelectEmitFn) => {
|
|||||||
|
|
||||||
const selectDisabled = computed(() => props.disabled || elForm?.disabled)
|
const selectDisabled = computed(() => props.disabled || elForm?.disabled)
|
||||||
|
|
||||||
|
const needStatusIcon = computed(() => elForm?.statusIcon ?? false)
|
||||||
|
|
||||||
const popupHeight = computed(() => {
|
const popupHeight = computed(() => {
|
||||||
const totalHeight = filteredOptions.value.length * props.itemHeight
|
const totalHeight = filteredOptions.value.length * props.itemHeight
|
||||||
return totalHeight > props.height ? props.height : totalHeight
|
return totalHeight > props.height ? props.height : totalHeight
|
||||||
@ -913,6 +915,7 @@ const useSelect = (props: ISelectV2Props, emit: SelectEmitFn) => {
|
|||||||
shouldShowPlaceholder,
|
shouldShowPlaceholder,
|
||||||
selectDisabled,
|
selectDisabled,
|
||||||
selectSize,
|
selectSize,
|
||||||
|
needStatusIcon,
|
||||||
showClearBtn,
|
showClearBtn,
|
||||||
states,
|
states,
|
||||||
isFocused,
|
isFocused,
|
||||||
|
@ -229,7 +229,7 @@
|
|||||||
<component :is="clearIcon" />
|
<component :is="clearIcon" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<el-icon
|
<el-icon
|
||||||
v-if="validateState && validateIcon"
|
v-if="validateState && validateIcon && needStatusIcon"
|
||||||
:class="[nsInput.e('icon'), nsInput.e('validateIcon')]"
|
:class="[nsInput.e('icon'), nsInput.e('validateIcon')]"
|
||||||
>
|
>
|
||||||
<component :is="validateIcon" />
|
<component :is="validateIcon" />
|
||||||
|
@ -141,6 +141,8 @@ export const useSelect = (props: ISelectProps, emit) => {
|
|||||||
: !isEmptyValue(props.modelValue)
|
: !isEmptyValue(props.modelValue)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const needStatusIcon = computed(() => form?.statusIcon ?? false)
|
||||||
|
|
||||||
const showClose = computed(() => {
|
const showClose = computed(() => {
|
||||||
return (
|
return (
|
||||||
props.clearable &&
|
props.clearable &&
|
||||||
@ -826,6 +828,7 @@ export const useSelect = (props: ISelectProps, emit) => {
|
|||||||
shouldShowPlaceholder,
|
shouldShowPlaceholder,
|
||||||
currentPlaceholder,
|
currentPlaceholder,
|
||||||
mouseEnterEventName,
|
mouseEnterEventName,
|
||||||
|
needStatusIcon,
|
||||||
showClose,
|
showClose,
|
||||||
iconComponent,
|
iconComponent,
|
||||||
iconReverse,
|
iconReverse,
|
||||||
|
Loading…
Reference in New Issue
Block a user