mirror of https://github.com/ElemeFE/element
Switch: fix change event parameter
parent
cbb3fa095f
commit
f2fee567b9
|
@ -126,7 +126,7 @@
|
|||
},
|
||||
methods: {
|
||||
handleChange(event) {
|
||||
this.$emit('change', event.currentTarget.checked);
|
||||
this.$emit('change', event.currentTarget.checked ? this.onValue : this.offValue);
|
||||
},
|
||||
setBackgroundColor() {
|
||||
let newColor = this.checked ? this.onColor : this.offColor;
|
||||
|
|
Loading…
Reference in New Issue