@pixui-dev/pixui-react-virtualwaterfall
Advanced tools
+1
-1
| { | ||
| "name": "@pixui-dev/pixui-react-virtualwaterfall", | ||
| "version": "1.0.11", | ||
| "version": "1.0.12", | ||
| "description": "pixui 高性能React虚拟瀑布流组件", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
+4
-2
@@ -834,3 +834,3 @@ # VirtualWaterfallList 虚拟瀑布流组件 | ||
| getItemHeight(item: any, index: number, itemWidth: number) { | ||
| return 270; | ||
| return item.height; | ||
| } | ||
@@ -1013,2 +1013,5 @@ | ||
| ### 1.0.12 | ||
| 1. 修复 removeItemByIndex 最后一个元素的报错,以及高度更新问题。 | ||
| ### 1.0.11 | ||
@@ -1032,3 +1035,2 @@ 1. 提供 getVisibleIndices, 用于获取可视区域项目索引的拷贝 | ||
| ### 1.0.6 | ||
@@ -1035,0 +1037,0 @@ 1. 修复1.0.5 去除 key后,下拉刷新的更新问题 |
@@ -390,6 +390,11 @@ var __extends = (this && this.__extends) || (function () { | ||
| _this.layoutedItemCount = endIndex; | ||
| // 获取最后一个项目的缓存列高度 | ||
| var cachedColumnHeights = _this.cachedLayouts[data.length - 1].cachedColumnHeights; | ||
| // 更新总高度 | ||
| _this.totalHeight = Math.max.apply(Math, cachedColumnHeights); | ||
| if (data.length == 0) { | ||
| _this.totalHeight = 0; | ||
| } | ||
| else { | ||
| // 获取最后一个项目的缓存列高度 | ||
| var cachedColumnHeights = _this.cachedLayouts[data.length - 1].cachedColumnHeights; | ||
| // 更新总高度 | ||
| _this.totalHeight = Math.max.apply(Math, cachedColumnHeights); | ||
| } | ||
| // console.log('cachedColumnHeights', this.cachedLayouts[data.length - 1], cachedColumnHeights); | ||
@@ -396,0 +401,0 @@ // console.log('totalHeight', this.totalHeight); |
113578
0.21%1847
0.27%1040
0.19%