Browse Source

REPORT-77978 fix: 下拉树水印表现异常问题

es6
zsmj 2 years ago
parent
commit
d5565fef01
  1. 7
      src/case/editor/editor.defaulttext.js
  2. 1
      src/widget/multilayersingletree/multilayersingletree.combo.js
  3. 17
      src/widget/multilayersingletree/multilayersingletree.trigger.js

7
src/case/editor/editor.defaulttext.js

@ -46,12 +46,15 @@ BI.DefaultTextEditor = BI.inherit(BI.Widget, {
errorText: o.errorText,
invisible: true,
});
var showText = BI.isFunction(o.text) ? o.text() : o.text;
this.text = BI.createWidget({
type: "bi.text_button",
cls: BI.isKey(o.text) ? "tip-text-style" : "bi-water-mark tip-text-style",
cls: BI.isKey(showText) ? "tip-text-style" : "bi-water-mark tip-text-style",
textAlign: "left",
height: o.height,
text: BI.isKey(o.text) ? o.text : o.defaultText,
text: showText || o.defaultText,
hgap: o.hgap + 2,
handler: function () {
self._showInput();

1
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -105,6 +105,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
valueFormatter: o.valueFormatter,
height: o.height,
text: o.text,
defaultText: o.defaultText,
value: o.value,
tipType: o.tipType,
warningTitle: o.warningTitle,

17
src/widget/multilayersingletree/multilayersingletree.trigger.js

@ -37,11 +37,11 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
},
isAutoSearch: false,
el: {
type: "bi.state_editor",
type: "bi.default_text_editor",
ref: function () {
self.editor = this;
},
defaultText: o.text,
defaultText: o.defaultText,
text: this._digest(o.value),
value: o.value,
height: o.height,
@ -192,16 +192,11 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
return o.valueFormatter(v);
}
if (o.itemsCreator === BI.emptyFn) {
var result = BI.find(o.items, function (i, item) {
return item.value === v;
});
return BI.isNotNull(result) ? result.text : o.text;
}
return v;
var result = BI.find(o.items, function (i, item) {
return item.value === v;
});
return BI.isNotNull(result) ? result.text : (o.text ?? v);
},
_getShowText: function () {

Loading…
Cancel
Save