mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
fix(select): return type of isSelected
This commit is contained in:
parent
9db4e0edaa
commit
5c85340bf4
@ -343,7 +343,7 @@ export default {
|
||||
isSelected (option) {
|
||||
if (this.multiple) {
|
||||
if (!Array.isArray(this.value)) return false
|
||||
return 1 + this.value.findIndex(value => value === option.value)
|
||||
return !!~this.value.findIndex(value => value === option.value)
|
||||
} else {
|
||||
return option.value === this.value
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user