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