From f1fd2ffe47a53cd69c23a4951520a22da9b80ac2 Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 18 Jul 2022 15:24:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JRIA=20fix:=20bi.list=5Fpane=20?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E5=90=8Etiptext=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/layer/pane.list.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/case/layer/pane.list.js b/src/case/layer/pane.list.js index fcc8492f5..26be09624 100644 --- a/src/case/layer/pane.list.js +++ b/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 () { - 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("参数不能为空"); }