mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +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(
|
watch(
|
||||||
() => props.modelValue,
|
() => props.modelValue,
|
||||||
(val, oldVal) => {
|
(val, oldVal) => {
|
||||||
|
const isValEmpty = !val || (isArray(val) && val.length === 0)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!val ||
|
isValEmpty ||
|
||||||
(props.multiple && val.toString() !== states.previousValue) ||
|
(props.multiple && !isEqual(val.toString(), states.previousValue)) ||
|
||||||
(!props.multiple &&
|
(!props.multiple &&
|
||||||
getValueKey(val) !== getValueKey(states.previousValue))
|
getValueKey(val) !== getValueKey(states.previousValue))
|
||||||
) {
|
) {
|
||||||
|
Loading…
Reference in New Issue
Block a user