From e718a6a28c6c61076e88750eee749efd5c57a442 Mon Sep 17 00:00:00 2001 From: iczer <1126263215@qq.com> Date: Fri, 24 Aug 2018 17:53:16 +0800 Subject: [PATCH] fix: ColorCheckBox's change event problem --- src/components/check/ColorCheckBox.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/check/ColorCheckBox.vue b/src/components/check/ColorCheckBox.vue index 7a0c05f..4983552 100644 --- a/src/components/check/ColorCheckBox.vue +++ b/src/components/check/ColorCheckBox.vue @@ -44,9 +44,9 @@ const Group = { } }, watch: { - 'values': function (newVal, oldVal) { + values: function (newVal, oldVal) { // 此条件是为解决单选时,触发两次chang事件问题 - if (!(newVal.length === 1 && oldVal.length === 1 && newVal[0] === oldVal[0])) { + if (!(newVal.length === 1 && oldVal.length === 1 && newVal[0] === oldVal[0]) || this.multiple) { this.$emit('change', this.values, this.colors) } }