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.
|
|
|
/**
|
|
|
|
* guy
|
|
|
|
* 标红行为
|
|
|
|
* @class BI.RedMarkBehavior
|
|
|
|
* @extends BI.Behavior
|
|
|
|
*/
|
|
|
|
BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
|
|
|
|
_defaultConfig: function () {
|
|
|
|
return BI.extend(BI.RedMarkBehavior.superclass._defaultConfig.apply(this, arguments), {
|
|
|
|
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
_init: function () {
|
|
|
|
BI.RedMarkBehavior.superclass._init.apply(this, arguments);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
doBehavior: function (items) {
|
|
|
|
var args = Array.prototype.slice.call(arguments, 1),
|
|
|
|
o = this.options;
|
|
|
|
BI.each(items, function (i, item) {
|
|
|
|
if(item instanceof BI.Single) {
|
|
|
|
if (o.rule(item.getValue(), item)) {
|
|
|
|
item.doRedMark.apply(item, args);
|
|
|
|
} else {
|
|
|
|
item.unRedMark.apply(item, args);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
item.doBehavior.apply(item, args);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|