fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.6 KiB

/**
* @class BI.SmallTextValueCombo
* @extend BI.Widget
* combo : text + icon, popup : text
* 参见场景dashboard布局方式选择
*/
BI.SmallTextValueCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
width: 100,
height: 20,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
el: {},
text: ""
7 years ago
});
},
render: function () {
var o = this.options;
return {
type: "bi.text_value_combo",
ref: (_ref) => {
this.combo = _ref;
},
height: o.height,
chooseType: o.chooseType,
el: {
type: "bi.small_select_text_trigger",
...o.el
},
text: o.text,
value: o.value,
defaultText: o.defaultText,
allowClear: o.allowClear,
status: o.status,
title: o.title,
listeners: [{
eventName: BI.TextValueCombo.EVENT_CHANGE,
action: (...args) => {
this.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE, ...args);
}
}]
}
},
setValue: function (v) {
this.combo.setValue(v);
},
getValue: function () {
return this.combo.getValue();
},
populate: function (items) {
this.combo.populate(items);
}
});
BI.SmallTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.small_text_value_combo", BI.SmallTextValueCombo);