提交 b70da53f 编写于 作者: J Jiewei Qian 提交者: Jikkai Xiao

DatePicker: improve form change validation (#12348)

watch.value will keep firing during time picker selection
it now detects whether panel is closed before firing el.form.change
上级 02176e26
......@@ -429,7 +429,7 @@ export default {
}
},
value(val, oldVal) {
if (!valueEquals(val, oldVal)) {
if (!valueEquals(val, oldVal) && !this.pickerVisible) {
this.dispatch('ElFormItem', 'el.form.change', val);
}
}
......@@ -893,6 +893,7 @@ export default {
// determine user real change only
if (!valueEquals(val, this.valueOnOpen)) {
this.$emit('change', val);
this.dispatch('ElFormItem', 'el.form.change', val);
this.valueOnOpen = val;
}
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册