Commit 829a2e4cfc73229ed53595d1bf992e2979d0558a

Authored by 梁灏
1 parent d31b0801

fixed CheckboxGroup bug

fixed CheckboxGroup bug
src/components/checkbox/checkbox-group.vue
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 const prefixCls = 'ivu-checkbox-group'; 7 const prefixCls = 'ivu-checkbox-group';
8 8
9 export default { 9 export default {
  10 + name: 'checkboxGroup',
10 props: { 11 props: {
11 model: { 12 model: {
12 type: Array, 13 type: Array,
src/components/checkbox/checkbox.vue
@@ -74,6 +74,7 @@ @@ -74,6 +74,7 @@
74 } 74 }
75 }, 75 },
76 ready () { 76 ready () {
  77 + if (this.$parent && this.$parent.$options.name === 'checkboxGroup') this.group = true;
77 if (!this.group) { 78 if (!this.group) {
78 this.updateModel(); 79 this.updateModel();
79 if (this.$els.slot && this.$els.slot.innerHTML === '') { 80 if (this.$els.slot && this.$els.slot.innerHTML === '') {