Browse Source

无JRIA fix: bi.list_pane 回调后tiptext处理

es6
zsmj 2 years ago
parent
commit
f1fd2ffe47
  1. 8
      src/case/layer/pane.list.js

8
src/case/layer/pane.list.js

@ -47,11 +47,15 @@ BI.ListPane = BI.inherit(BI.Pane, {
}
o.itemsCreator(op, function () {
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();
// 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("参数不能为空");
}

Loading…
Cancel
Save