Commit f2fee567 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

Switch: fix change event parameter

parent cbb3fa09
......@@ -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;
......
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