mirror of
https://github.com/iczer/vue-antd-admin.git
synced 2025-04-06 03:57:44 +08:00
fix: ColorCheckBox's change event problem
This commit is contained in:
parent
94c172f41f
commit
e718a6a28c
@ -44,9 +44,9 @@ const Group = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'values': function (newVal, oldVal) {
|
values: function (newVal, oldVal) {
|
||||||
// 此条件是为解决单选时,触发两次chang事件问题
|
// 此条件是为解决单选时,触发两次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)
|
this.$emit('change', this.values, this.colors)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user