From 5c85340bf4c4e442f3112506ba4537b5214231a4 Mon Sep 17 00:00:00 2001 From: 07akioni <07akioni2@gmail.com> Date: Thu, 26 Dec 2019 01:37:42 +0800 Subject: [PATCH] fix(select): return type of isSelected --- packages/common/Select/src/Select.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/Select/src/Select.vue b/packages/common/Select/src/Select.vue index ab030f433..97b45f4f3 100644 --- a/packages/common/Select/src/Select.vue +++ b/packages/common/Select/src/Select.vue @@ -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 }