/** * @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: "" }); }, 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);