研发图纸文件管理系统-前端项目
iczer
2018-08-24 e718a6a28c6c61076e88750eee749efd5c57a442
fix: ColorCheckBox's change event problem
1个文件已修改
4 ■■■■ 已修改文件
src/components/check/ColorCheckBox.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/check/ColorCheckBox.vue
@@ -44,9 +44,9 @@
    }
  },
  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)
      }
    }