循环
1
2{this.state.jobs.map((job, i) => (
))}页面滑动到底部做的操作
1
2
3
4
5
6
7
8
9<ScrollView onMomentumScrollEnd={this.contentViewScroll}>
contentViewScroll(e: Object){
let offsetY = e.nativeEvent.contentOffset.y; //滑动距离
let contentSizeHeight = e.nativeEvent.contentSize.height; //scrollView contentSize高度
let originScrollHeight = e.nativeEvent.layoutMeasurement.height; //scrollView高度
if (offsetY + originScrollHeight >= contentSizeHeight){
console.log("到底部了")
}
}