Commit 324ee724 authored by remizovvv's avatar remizovvv Committed by 杨奕

Picker: Only emit 'change' event when value is changed. (#9029)

* isue#9027 picker emit only real user change

* issue#9027 date-picker emit change if user real change only

* issue#9027 date-picker emit change if user real change only
parent 1eba6fda
...@@ -770,9 +770,12 @@ export default { ...@@ -770,9 +770,12 @@ export default {
}, },
emitChange(val) { emitChange(val) {
// determine user real change only
if (val !== this.valueOnOpen) {
this.$emit('change', val); this.$emit('change', val);
this.dispatch('ElFormItem', 'el.form.change', val); this.dispatch('ElFormItem', 'el.form.change', val);
this.valueOnOpen = val; this.valueOnOpen = val;
}
}, },
emitInput(val) { emitInput(val) {
......
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