From 5c0ccf9df9bbff455e2ca60547f8544fa3cba03e Mon Sep 17 00:00:00 2001 From: iczer <1126263215@qq.com> Date: Thu, 2 Jul 2020 22:22:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20selection=20problem=20in=20ColorCheckBox?= =?UTF-8?q?=20radio=20mode;=20:bug:=20=E4=BF=AE=E5=A4=8D=EF=BC=9AColorChec?= =?UTF-8?q?kBox=20=E5=8D=95=E9=80=89=E6=A8=A1=E5=BC=8F=E4=B8=8B=E7=9A=84?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E9=97=AE=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/checkbox/ColorCheckbox.vue | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/components/checkbox/ColorCheckbox.vue b/src/components/checkbox/ColorCheckbox.vue index b90e55e..8641371 100644 --- a/src/components/checkbox/ColorCheckbox.vue +++ b/src/components/checkbox/ColorCheckbox.vue @@ -44,18 +44,6 @@ const Group = { watch: { values(value) { this.$emit('change', value, this.colors) - }, - defaultValues(value) { - if (this.multiple) { - this.options.forEach(item => { - item.sChecked = value.indexOf(item.value) > -1 - }) - } else { - this.options.forEach(item => { - let first = value[0] - item.sChecked = first && first == item.value - }) - } } }, methods: { @@ -143,7 +131,7 @@ export default { initChecked() { let groupContext = this.groupContext if (!groupContext) { - return this.check + return this.checked }else if (groupContext.multiple) { return groupContext.defaultValues.indexOf(this.value) > -1 } else {