mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
fix(components): [select-v2] resolve overlap of tags and placeholder (#18388)
* fix(components): [select-v2] resolve overlap of tags and placeholder closed #18382 * Update packages/components/select-v2/src/useSelect.ts ok Co-authored-by: btea <2356281422@qq.com> --------- Co-authored-by: btea <2356281422@qq.com>
This commit is contained in:
parent
343cacf5cc
commit
0cc526e1c1
@ -814,9 +814,11 @@ const useSelect = (props: ISelectV2Props, emit: SelectEmitFn) => {
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val, oldVal) => {
|
||||
const isValEmpty = !val || (isArray(val) && val.length === 0)
|
||||
|
||||
if (
|
||||
!val ||
|
||||
(props.multiple && val.toString() !== states.previousValue) ||
|
||||
isValEmpty ||
|
||||
(props.multiple && !isEqual(val.toString(), states.previousValue)) ||
|
||||
(!props.multiple &&
|
||||
getValueKey(val) !== getValueKey(states.previousValue))
|
||||
) {
|
||||
|
Loading…
Reference in New Issue
Block a user