mirror of https://github.com/vuejs/core.git
chore(runtime-vapor): simplify
This commit is contained in:
parent
c1d9b64b7b
commit
67e785afd7
|
@ -191,11 +191,9 @@ function setSelected(el: HTMLSelectElement, value: any, number: boolean) {
|
||||||
} else {
|
} else {
|
||||||
option.selected = value.has(optionValue)
|
option.selected = value.has(optionValue)
|
||||||
}
|
}
|
||||||
} else {
|
} else if (looseEqual(getValue(option), value)) {
|
||||||
if (looseEqual(getValue(option), value)) {
|
if (el.selectedIndex !== i) el.selectedIndex = i
|
||||||
if (el.selectedIndex !== i) el.selectedIndex = i
|
return
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isMultiple && el.selectedIndex !== -1) {
|
if (!isMultiple && el.selectedIndex !== -1) {
|
||||||
|
|
Loading…
Reference in New Issue