mirror of https://github.com/ElemeFE/element
Switch: fix input and change emission sequence
parent
1ba66276c3
commit
cfe5f9eb3d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue