Commit 85a8ea0a authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

Checkbox: fix change event param

parent 2b5efef3
......@@ -15,3 +15,4 @@ cd ../..
# deploy domestic site
faas deploy alpha
rm -rf temp_web
\ No newline at end of file
......@@ -165,9 +165,15 @@
}
},
handleChange(ev) {
this.$nextTick(() => {
if (this.isLimitExceeded) return;
this.$emit('change', this.model, ev);
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._checkboxGroup) {
this.dispatch('ElCheckboxGroup', 'change', [this._checkboxGroup.value]);
}
......
......@@ -176,9 +176,15 @@
}
},
handleChange(ev) {
this.$nextTick(() => {
if (this.isLimitExceeded) return;
this.$emit('change', this.model, ev);
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]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment