Commit cfe5f9eb authored by wacky6.AriesMBP's avatar wacky6.AriesMBP Committed by 杨奕

Switch: fix input and change emission sequence

parent 1ba66276
...@@ -119,8 +119,8 @@ ...@@ -119,8 +119,8 @@
}, },
methods: { methods: {
handleChange(event) { handleChange(event) {
this.$emit('change', !this.checked ? this.onValue : this.offValue);
this.$emit('input', !this.checked ? this.onValue : this.offValue); this.$emit('input', !this.checked ? this.onValue : this.offValue);
this.$emit('change', !this.checked ? this.onValue : this.offValue);
this.$nextTick(() => { this.$nextTick(() => {
// set input's checked property // set input's checked property
// in case parent refuses to change component's value // in case parent refuses to change component's 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