This commit is contained in:
wanghaoo 2018-12-25 13:34:37 +08:00
parent 0f884679a5
commit e0eeb67192
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,8 @@ export default function bigData(Table) {
};
const rowHeight = this.props.height?this.props.height:defaultHeight
//默认显示25条rowsInView根据定高算的。在非固定高下这个只是一个大概的值。
this.rowsInView = this.props.scroll.y?Math.ceil(this.props.scroll.y/rowHeight):20 ;
const scrollY = this.props.scroll.y ? parseInt(this.props.scroll.y) : 0;
this.rowsInView = scrollY ? Math.ceil(scrollY/rowHeight):20 ;
this.currentIndex = 0;
this.loadCount = props.loadBuffer? this.rowsInView + props.loadBuffer*2:26;//一次加载多少数据
this.cachedRowHeight = [];//缓存每行的高度