mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-02 04:08:10 +08:00
input add validateEvent prop
This commit is contained in:
parent
0922fc3683
commit
b9eed734e2
@ -113,7 +113,11 @@
|
||||
maxlength: Number,
|
||||
minlength: Number,
|
||||
max: {},
|
||||
min: {}
|
||||
min: {},
|
||||
validateEvent: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
@ -131,7 +135,9 @@
|
||||
methods: {
|
||||
handleBlur(event) {
|
||||
this.$emit('blur', event);
|
||||
this.dispatch('ElFormItem', 'el.form.blur', [this.currentValue]);
|
||||
if (this.validateEvent) {
|
||||
this.dispatch('ElFormItem', 'el.form.blur', [this.currentValue]);
|
||||
}
|
||||
},
|
||||
inputSelect() {
|
||||
this.$refs.input.select();
|
||||
@ -162,7 +168,9 @@
|
||||
this.currentValue = value;
|
||||
this.$emit('input', value);
|
||||
this.$emit('change', value);
|
||||
this.dispatch('ElFormItem', 'el.form.change', [value]);
|
||||
if (this.validateEvent) {
|
||||
this.dispatch('ElFormItem', 'el.form.change', [value]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user