From f5f8615df0a308beff9f8d0f883bcd994c5c17d9 Mon Sep 17 00:00:00 2001 From: "Vivy.Pan" Date: Wed, 8 Feb 2023 15:19:10 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-14215=20fix:bi.editor=E7=BB=84=E4=BB=B6e?= =?UTF-8?q?rrorText=E6=97=A0=E6=B3=95=E6=9B=B4=E6=96=B0-bug46?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/editor/editor.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/base/single/editor/editor.js b/src/base/single/editor/editor.js index fb359f234..7ad107ff6 100644 --- a/src/base/single/editor/editor.js +++ b/src/base/single/editor/editor.js @@ -232,9 +232,9 @@ export class Editor extends Single { } _checkToolTip() { - const { errorText } = this.options; + let errorText = this.options.errorText; if (isFunction(errorText)) { - this.options.errorText = errorText(this.editor.getValue()); + errorText = errorText(this.editor.getValue()); } if (isKey(errorText)) { if (!this.isEnabled() || this.isValid() || Bubbles.has(this.getName())) { @@ -324,9 +324,10 @@ export class Editor extends Single { } _setErrorVisible(b) { - const { errorText, autoTrim, simple } = this.options; + const { autoTrim, simple } = this.options; + let errorText = this.options.errorText; if (isFunction(errorText)) { - this.options.errorText = errorText(autoTrim ? trim(this.editor.getValue()) : this.editor.getValue()); + errorText = errorText(autoTrim ? trim(this.editor.getValue()) : this.editor.getValue()); } if (!this.disabledError && isKey(errorText)) { Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {