From 88284129bd9f217d2e482c51825636aea2ea9965 Mon Sep 17 00:00:00 2001 From: Treecat Date: Tue, 25 Apr 2023 15:00:01 +0800 Subject: [PATCH] =?UTF-8?q?BI-125433=20fix:=E4=BF=AE=E5=A4=8Dtexteditor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fineui/src/base/single/editor/editor.textarea.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/fineui/src/base/single/editor/editor.textarea.js b/packages/fineui/src/base/single/editor/editor.textarea.js index 65076020f..4152af588 100644 --- a/packages/fineui/src/base/single/editor/editor.textarea.js +++ b/packages/fineui/src/base/single/editor/editor.textarea.js @@ -212,11 +212,12 @@ export class TextAreaEditor extends Single { _setErrorVisible(b) { const { adjustYOffset, adjustXOffset, offsetStyle } = this.options; - if (isFunction(this.options.errorText)) { - this.options.errorText = this.options.errorText(trim(this.getValue())); + let errorText = this.options.errorText; + if (isFunction(errorText)) { + errorText = errorText(trim(this.getValue())); } - if (!this.disabledError && isKey(this.options.errorText)) { - Bubbles[b ? "show" : "hide"](this.getName(), this.options.errorText, this, { + if (!this.disabledError && isKey(errorText)) { + Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, { adjustYOffset, adjustXOffset, offsetStyle,