From 3bd52848124d544a7d9eb7da7c04fe21fc130d46 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 15 Nov 2021 10:50:15 +0800 Subject: [PATCH] fix(Field): should not trigger validation after blurring readonly input (#9863) --- src/field/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/field/index.js b/src/field/index.js index 73db41166..a13e28665 100644 --- a/src/field/index.js +++ b/src/field/index.js @@ -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);