From 8cc5ed019917c62da81f7de80c1606b180e46890 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 26 Sep 2022 22:18:30 +0800 Subject: [PATCH] =?UTF-8?q?chore=EF=BC=9A=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/list/virtualgrouplist.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/base/list/virtualgrouplist.js b/src/base/list/virtualgrouplist.js index a4a811c73..34b11e800 100644 --- a/src/base/list/virtualgrouplist.js +++ b/src/base/list/virtualgrouplist.js @@ -27,7 +27,7 @@ BI.VirtualGroupList = BI.inherit(BI.Widget, { render: function () { var self = this, o = this.options; - + return { type: "bi.vertical", items: [{ @@ -97,12 +97,13 @@ BI.VirtualGroupList = BI.inherit(BI.Widget, { this.container[self.renderedIndex === -1 ? "populate" : "addItems"](items.map(function (item, i) { return o.itemFormatter(item, index + i); }), this); - var addedHeight = getElementHeight() - lastHeight; + var elementHeight = getElementHeight(); + var addedHeight = elementHeight - lastHeight; this.tree.set(cnt, addedHeight); this.renderedIndex = cnt; cnt++; index += o.blockSize; - lastHeight = this.renderedIndex === -1 ? 0 : getElementHeight(); + lastHeight = this.renderedIndex === -1 ? 0 : elementHeight; } },