Browse Source

BI-119112 fix:editor可以自定义error bubble位置

research/test
Claire 2 years ago
parent
commit
287c609f6c
  1. 2
      src/base/single/editor/editor.js
  2. 1
      typescript/base/single/editor/editor.ts

2
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();
}

1
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;

Loading…
Cancel
Save