Commit a804d60885bda4be86b6c7dede1933b6727fce33
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,7 +78,6 @@ | ||
78 | const checked = event.target.checked; | 78 | const checked = event.target.checked; |
79 | this.currentValue = checked; | 79 | this.currentValue = checked; |
80 | this.$emit('input', checked); | 80 | this.$emit('input', checked); |
81 | - this.$emit('on-change', checked); | ||
82 | 81 | ||
83 | if (this.group && this.label) { | 82 | if (this.group && this.label) { |
84 | this.$parent.change({ | 83 | this.$parent.change({ |
@@ -86,8 +85,11 @@ | @@ -86,8 +85,11 @@ | ||
86 | checked: this.value | 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 | updateValue () { | 94 | updateValue () { |
93 | this.currentValue = this.value; | 95 | this.currentValue = this.value; |