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