Commit a804d60885bda4be86b6c7dede1933b6727fce33

Authored by 梁灏
1 parent cbe03a12

update Radio

update Radio
Showing 1 changed file with 5 additions and 3 deletions   Show diff stats
src/components/radio/radio.vue
... ... @@ -78,7 +78,6 @@
78 78 const checked = event.target.checked;
79 79 this.currentValue = checked;
80 80 this.$emit('input', checked);
81   - this.$emit('on-change', checked);
82 81  
83 82 if (this.group && this.label) {
84 83 this.$parent.change({
... ... @@ -86,8 +85,11 @@
86 85 checked: this.value
87 86 });
88 87 }
89   - // todo 事件
90   -// if (!this.group) this.$dispatch('on-form-change', checked);
  88 + if (!this.group) {
  89 + this.$emit('on-change', checked);
  90 + // todo 事件
  91 +// this.$dispatch('on-form-change', checked);
  92 + }
91 93 },
92 94 updateValue () {
93 95 this.currentValue = this.value;
... ...