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.

51 lines
1.4 KiB

/**
* Created by roy on 15/9/6.
*/
BI.DownListGroup = BI.inherit(BI.Widget, {
constants: {
iconCls: "check-mark-ha-font"
},
_defaultConfig: function () {
return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-down-list-group",
items: [
{
el: {}
}
]
7 years ago
});
},
_init: function () {
BI.DownListGroup.superclass._init.apply(this, arguments);
var o = this.options, self = this;
this.downlistgroup = BI.createWidget({
element: this,
type: "bi.button_tree",
items: o.items,
7 years ago
chooseType: 0, // 0单选,1多选
layouts: [{
type: "bi.vertical",
hgap: 0,
vgap: 0
}],
value: o.value
});
this.downlistgroup.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if(type === BI.Events.CLICK) {
self.fireEvent(BI.DownListGroup.EVENT_CHANGE, arguments);
}
7 years ago
});
},
7 years ago
getValue: function () {
return this.downlistgroup.getValue();
},
7 years ago
setValue: function (v) {
this.downlistgroup.setValue(v);
}
7 years ago
});
BI.DownListGroup.EVENT_CHANGE = "EVENT_CHANGE";
8 years ago
BI.shortcut("bi.down_list_group", BI.DownListGroup);