From 0a0bc094920119e8021293c2ba0ef101cf7a36e7 Mon Sep 17 00:00:00 2001 From: Mio Date: Thu, 22 Apr 2021 21:28:18 +0800 Subject: [PATCH] =?UTF-8?q?JSY-4371=20feat:=20=E6=8F=90=E4=BE=9B=E6=9C=80?= =?UTF-8?q?=E5=90=8E=E4=B8=80=E8=A1=8C=E6=9C=80=E5=90=8E=E4=B8=80=E5=88=97?= =?UTF-8?q?=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/collection/collection.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/base/collection/collection.js b/src/base/collection/collection.js index 3cb3b6721..b9bb3383b 100644 --- a/src/base/collection/collection.js +++ b/src/base/collection/collection.js @@ -103,7 +103,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { _cellRenderers: function (height, width, x, y) { this._lastRenderedCellIndices = this._sectionManager.getCellIndices(height, width, x, y); - return this._cellGroupRenderer(); +return this._cellGroupRenderer(); }, _cellGroupRenderer: function () { @@ -113,7 +113,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { var cellMetadata = self._sectionManager.getCellMetadata(index); rendered.push(cellMetadata); }); - return rendered; +return rendered; }, _calculateChildrenToRender: function () { @@ -160,6 +160,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { var datum = childrenToDisplay[i]; var index = this.renderedKeys[datum.index] && this.renderedKeys[datum.index][1]; var child; + var lastDatum = childrenToDisplay[len - 1]; if (index >= 0) { if (datum.width !== this.renderedCells[index]._width) { this.renderedCells[index]._width = datum.width; @@ -182,7 +183,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { width: datum.width, height: datum.height }, o.items[datum.index], { - cls: (o.items[datum.index].cls || "") + " collection-cell" + (datum.y === 0 ? " first-row" : "") + (datum.x === 0 ? " first-col" : ""), + cls: (o.items[datum.index].cls || "") + " collection-cell" + (datum.y === 0 ? " first-row" : "") + (datum.x === 0 ? " first-col" : "") + (datum.row === lastDatum.row ? " last-row" : "") + (datum.col === lastDatum.col ? " last-col" : ""), _left: datum.x, _top: datum.y }));