fix: 滚动加载场景中,数据动态改变下占位计算错误的问题

This commit is contained in:
izbz wh 2019-06-26 14:38:03 +08:00
parent cf304dca9c
commit 5801386bee
3 changed files with 42 additions and 16 deletions

54
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -61,6 +61,8 @@ export default function bigData(Table) {
}
if (nextProps.data !== props.data) {
_this.cachedRowHeight = []; //缓存每行的高度
_this.cachedRowParentIndex = [];
_this.computeCachedRowParentIndex(nextProps.data);
if(nextProps.data.length>0){
_this.endIndex = _this.currentIndex - nextProps.loadBuffer + _this.loadCount; //数据结束位置