Browse Source

无JIRA fix: bi.text_value_down_list_combo修复

es6
zsmj 2 years ago
parent
commit
8c3b50b19e
  1. 22
      src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js

22
src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js

@ -19,14 +19,6 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
if(BI.isNotNull(o.value)) { if(BI.isNotNull(o.value)) {
value = this._digest(o.value); value = this._digest(o.value);
} }
this.trigger = BI.createWidget({
type: "bi.down_list_select_text_trigger",
cls: "text-value-down-list-trigger",
height: BI.toPix(o.height, 2),
items: o.items,
text: o.text,
value: value
});
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.down_list_combo", type: "bi.down_list_combo",
@ -35,7 +27,17 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
adjustLength: 2, adjustLength: 2,
width: BI.toPix(o.width, 2), width: BI.toPix(o.width, 2),
height: BI.toPix(o.height, 2), height: BI.toPix(o.height, 2),
el: this.trigger, el: {
type: "bi.down_list_select_text_trigger",
ref: function (_ref) {
self.trigger = _ref;
},
cls: "text-value-down-list-trigger",
height: BI.toPix(o.height, 2),
items: o.items,
text: o.text,
value: value
},
value: BI.isNull(value) ? [] : [value], value: BI.isNull(value) ? [] : [value],
items: BI.deepClone(o.items) items: BI.deepClone(o.items)
}); });
@ -79,7 +81,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
setValue: function (v) { setValue: function (v) {
v = this._digest(v); v = this._digest(v);
this.combo.setValue([v]); this.combo.setValue([v]);
this.trigger.setValue(v); this.trigger?.setValue(v);
}, },
getValue: function () { getValue: function () {

Loading…
Cancel
Save