fix(select): return type of isSelected

This commit is contained in:
07akioni 2019-12-26 01:37:42 +08:00
parent 9db4e0edaa
commit 5c85340bf4

View File

@ -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
}