mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-17 11:49:41 +08:00
fix(components): [select] fix placeholder display (#11051)
closed # 11049
This commit is contained in:
parent
ea82d3f7c3
commit
44376fa0c7
@ -218,6 +218,15 @@ export const useSelect = (props, states: States, ctx) => {
|
||||
() => props.placeholder,
|
||||
(val) => {
|
||||
states.cachedPlaceHolder = states.currentPlaceholder = val
|
||||
|
||||
const hasValue =
|
||||
props.multiple &&
|
||||
Array.isArray(props.modelValue) &&
|
||||
props.modelValue.length > 0
|
||||
|
||||
if (hasValue) {
|
||||
states.currentPlaceholder = ''
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user