Switch: fix input and change emission sequence

pull/6557/head
wacky6.AriesMBP 2017-08-05 01:41:31 +10:00 committed by 杨奕
parent 1ba66276c3
commit cfe5f9eb3d
1 changed files with 1 additions and 1 deletions

View File

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