mirror of
https://github.com/568071718/creator-collection-view
synced 2025-05-25 02:34:01 +00:00
Merge pull request #6 from zhangyuantao/patch-1
修复Grid布局下滑回弹过程列表项数量显示不对
This commit is contained in:
commit
bfcb19293a
@ -130,7 +130,7 @@ export class GridLayout extends YXLayout {
|
|||||||
let num = this.getMaxItemsPerRow(collectionView)
|
let num = this.getMaxItemsPerRow(collectionView)
|
||||||
|
|
||||||
// 计算索引区间
|
// 计算索引区间
|
||||||
const startIdx = startRow * num
|
const startIdx = Math.max(startRow * num, 0) // 防止<0:当列表置顶往下滑时(rect.y < 0)得出startIdx为负数,导致slice截取为空(表现是回弹过程列表元素截断)
|
||||||
const endIdx = endRow * num
|
const endIdx = endRow * num
|
||||||
|
|
||||||
// 只返回区间节点的布局属性
|
// 只返回区间节点的布局属性
|
||||||
|
Loading…
x
Reference in New Issue
Block a user