From 287c609f6cd1f7954fbf5317ceb2ee6fa54991c0 Mon Sep 17 00:00:00 2001 From: Claire <1119518763@qq.com> Date: Thu, 22 Dec 2022 16:27:48 +0800 Subject: [PATCH] =?UTF-8?q?BI-119112=20fix:editor=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89error=20bubble=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/editor/editor.js | 2 +- typescript/base/single/editor/editor.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/base/single/editor/editor.js b/src/base/single/editor/editor.js index c0a77c9f6..098a0c543 100644 --- a/src/base/single/editor/editor.js +++ b/src/base/single/editor/editor.js @@ -276,7 +276,7 @@ BI.Editor = BI.inherit(BI.Single, { } if (!this.disabledError && BI.isKey(errorText)) { BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, { - adjustYOffset: o.simple ? 1 : 2, + adjustYOffset: BI.isKey(o.adjustYOffset) ? o.adjustYOffset : (o.simple ? 1 : 2), }); this._checkToolTip(); } diff --git a/typescript/base/single/editor/editor.ts b/typescript/base/single/editor/editor.ts index 2ac35a470..19f07aa0f 100644 --- a/typescript/base/single/editor/editor.ts +++ b/typescript/base/single/editor/editor.ts @@ -11,6 +11,7 @@ export declare class Editor extends Single { watermark?: string; errorText?: string | ((v: string) => string); autocomplete?: string; + adjustYOffset?: number; } & Single['props'] static EVENT_CHANGE: string;