update Radio

update Radio
This commit is contained in:
梁灏 2017-03-01 20:33:07 +08:00
parent cbe03a12b2
commit a804d60885

View file

@ -78,7 +78,6 @@
const checked = event.target.checked; const checked = event.target.checked;
this.currentValue = checked; this.currentValue = checked;
this.$emit('input', checked); this.$emit('input', checked);
this.$emit('on-change', checked);
if (this.group && this.label) { if (this.group && this.label) {
this.$parent.change({ this.$parent.change({
@ -86,8 +85,11 @@
checked: this.value checked: this.value
}); });
} }
if (!this.group) {
this.$emit('on-change', checked);
// todo // todo
// if (!this.group) this.$dispatch('on-form-change', checked); // this.$dispatch('on-form-change', checked);
}
}, },
updateValue () { updateValue () {
this.currentValue = this.value; this.currentValue = this.value;