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.

59 lines
1.6 KiB

/**
* 专门为calendar的视觉加的button作为私有button,不能配置任何属性也不要用这个玩意
*/
BI.CalendarDateItem = BI.inherit(BI.BasicButton, {
props: function() {
return {
baseCls: "bi-calendar-date-item",
height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT + 8,
}
},
render: function () {
var self = this, o = this.options;
return {
type: "bi.absolute",
items: [{
el: {
type: "bi.text_item",
3 years ago
cls: "bi-border-radius bi-list-item-select",
textAlign: "center",
text: o.text,
value: o.value,
ref: function () {
self.text = this;
}
},
left: o.lgap,
right: o.rgap,
3 years ago
top: o.tgap,
3 years ago
bottom: o.bgap
}]
};
},
doHighLight: function () {
this.text.doHighLight.apply(this.text, arguments);
},
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
setValue: function () {
if (!this.isReadOnly()) {
this.text.setValue.apply(this.text, arguments);
}
},
setSelected: function (b) {
BI.CalendarDateItem.superclass.setSelected.apply(this, arguments);
this.text.setSelected(b);
},
getValue: function () {
return this.text.getValue();
}
});
3 years ago
BI.shortcut("bi.calendar_date_item", BI.CalendarDateItem);