|
|
|
/**
|
|
|
|
* Created by GUY on 2015/6/26.
|
|
|
|
*/
|
|
|
|
|
|
|
|
BI.Label = BI.inherit(BI.AbstractLabel, {
|
|
|
|
|
|
|
|
props: {
|
|
|
|
baseCls: "bi-label",
|
|
|
|
py: "",
|
|
|
|
keyword: "",
|
|
|
|
},
|
|
|
|
|
|
|
|
getTitle: function () {
|
|
|
|
var title = this.options.title;
|
|
|
|
var text = this.options.text;
|
|
|
|
if (BI.isFunction(title)) {
|
|
|
|
return title();
|
|
|
|
}
|
|
|
|
if (BI.isNotNull(title)) {
|
|
|
|
return title;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (BI.isFunction(text)) {
|
|
|
|
return text();
|
|
|
|
}
|
|
|
|
|
|
|
|
return text;
|
|
|
|
},
|
|
|
|
|
|
|
|
doRedMark: function () {
|
|
|
|
this.text.doRedMark.apply(this.text, arguments);
|
|
|
|
},
|
|
|
|
|
|
|
|
unRedMark: function () {
|
|
|
|
this.text.unRedMark.apply(this.text, arguments);
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
BI.shortcut("bi.label", BI.Label);
|