mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
Switch: fix input and change emission sequence
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user