fix(Field): should not trigger validation after blurring readonly input (#9863)

This commit is contained in:
neverland 2021-11-15 10:50:15 +08:00 committed by GitHub
parent 35fa1e9a1d
commit 3bd5284812
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -352,13 +352,16 @@ export default createComponent({
// readonly not work in legacy mobile safari
/* istanbul ignore if */
const readonly = this.getProp('readonly');
if (readonly) {
if (this.getProp('readonly')) {
this.blur();
}
},
onBlur(event) {
if (this.getProp('readonly')) {
return;
}
this.focused = false;
this.updateValue(this.value, 'onBlur');
this.$emit('blur', event);