|
|
|
@ -47,11 +47,15 @@ BI.ListPane = BI.inherit(BI.Pane, {
|
|
|
|
|
} |
|
|
|
|
o.itemsCreator(op, function () { |
|
|
|
|
calback.apply(self, arguments); |
|
|
|
|
op.times === 1 && BI.nextTick(function () { |
|
|
|
|
self.loaded(); |
|
|
|
|
// callback可能在loading之前执行, check保证显示正确
|
|
|
|
|
self.check(); |
|
|
|
|
}); |
|
|
|
|
o.items = BI.concat(o.items, BI.get(arguments, [0], [])); |
|
|
|
|
if (op.times === 1) { |
|
|
|
|
o.items = BI.get(arguments, [0], []); |
|
|
|
|
BI.nextTick(function () { |
|
|
|
|
self.loaded(); |
|
|
|
|
// callback可能在loading之前执行, check保证显示正确
|
|
|
|
|
self.check(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
hasNext: o.hasNext, |
|
|
|
@ -113,7 +117,7 @@ BI.ListPane = BI.inherit(BI.Pane, {
|
|
|
|
|
populate: function (items) { |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
if (arguments.length === 0 && (BI.isFunction(this.button_group.attr("itemsCreator")))) {// 接管loader的populate方法
|
|
|
|
|
this.button_group.attr("itemsCreator").apply(this, [{times: 1}, function () { |
|
|
|
|
this.button_group.attr("itemsCreator").apply(this, [{ times: 1 }, function () { |
|
|
|
|
if (arguments.length === 0) { |
|
|
|
|
throw new Error("参数不能为空"); |
|
|
|
|
} |
|
|
|
|