Commit 99e8d119 authored by youngerheart's avatar youngerheart Committed by 杨奕

picker: fix time and bug for value validate

parent a9fcc971
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
@keydown.native="handleKeydown" @keydown.native="handleKeydown"
:value="displayValue" :value="displayValue"
@change.native="displayValue = $event.target.value" @change.native="displayValue = $event.target.value"
:validateEvent="false"
ref="reference"> ref="reference">
<i slot="icon" <i slot="icon"
class="el-input__icon" class="el-input__icon"
...@@ -222,6 +223,7 @@ export default { ...@@ -222,6 +223,7 @@ export default {
watch: { watch: {
pickerVisible(val) { pickerVisible(val) {
if (!val) this.dispatch('ElFormItem', 'el.form.blur');
if (this.readonly || this.disabled) return; if (this.readonly || this.disabled) return;
val ? this.showPicker() : this.hidePicker(); val ? this.showPicker() : this.hidePicker();
}, },
...@@ -241,6 +243,7 @@ export default { ...@@ -241,6 +243,7 @@ export default {
}, },
displayValue(val) { displayValue(val) {
this.$emit('change', val); this.$emit('change', val);
this.dispatch('ElFormItem', 'el.form.change');
} }
}, },
...@@ -383,7 +386,6 @@ export default { ...@@ -383,7 +386,6 @@ export default {
handleBlur() { handleBlur() {
this.$emit('blur', this); this.$emit('blur', this);
this.dispatch('ElFormItem', 'el.form.blur');
}, },
handleKeydown(event) { handleKeydown(event) {
......
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