fix:大数据场景,重新渲染时表体显示空白的问题

This commit is contained in:
yangchch6 2019-08-03 10:24:48 +08:00
parent cb543df6f5
commit 8e4d5b88e8
5 changed files with 8 additions and 4 deletions

View File

@ -90,6 +90,7 @@ function bigData(Table) {
if (nextProps.data.length > 0) {
_this.endIndex = _this.currentIndex - nextProps.loadBuffer + _this.loadCount; //数据结束位置
}
this.scrollTop = 0;
}
//如果传currentIndex会判断该条数据是否在可视区域如果没有的话则重新计算startIndex和endIndex
if (currentIndex !== -1 && currentIndex !== this.currentIndex) {

File diff suppressed because one or more lines are too long

6
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

@ -67,6 +67,7 @@ export default function bigData(Table) {
if(nextProps.data.length>0){
_this.endIndex = _this.currentIndex - nextProps.loadBuffer + _this.loadCount; //数据结束位置
}
this.scrollTop = 0;
}
//如果传currentIndex会判断该条数据是否在可视区域如果没有的话则重新计算startIndex和endIndex
if(currentIndex!==-1 && currentIndex !== this.currentIndex){