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.6 KiB

BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-item bi-list-item-active",
hgap: 10,
height: 24,
textAlign: "left"
});
},
_init: function () {
BI.SingleSelectItem.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
element: this,
textAlign: o.textAlign,
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
keyword: o.keyword,
value: o.value,
title: o.title || o.text,
warningTitle: o.warningTitle,
py: o.py
});
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.SingleSelectItem.superclass.doClick.apply(this, arguments);
if (this.isValid()) {
this.fireEvent(BI.SingleSelectItem.EVENT_CHANGE, this.isSelected(), this);
}
},
setSelected: function (v) {
BI.SingleSelectItem.superclass.setSelected.apply(this, arguments);
}
});
BI.SingleSelectItem.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_item", BI.SingleSelectItem);