element radio的handleChange事件
handleChange() {
this.$nextTick(() => {
this.$emit("change", this.model);
this.isGroup &&
this.dispatch("ElRadioGroup", "handleChange", this.model);
});
},
element checkbox的handleChange事件
handleChange(ev) {
if (this.isLimitExceeded) return;
let value;
if (ev.target.checked) {
value = this.trueLabel === undefined ? true : this.trueLabel;
} else {
value = this.falseLabel === undefined ? false : this.falseLabel;
}
this.$emit("change", value, ev);
this.$nextTick(() => {
if (this.isGroup) {
this.dispatch("ElCheckboxGroup", "change", [
this._checkboxGroup.value,
]);
}
});
},
这两个同样事件为什么checkbox的change不需要放入$nextTick中执行