@jd_5cb6196859c2e 要设置upperThreshold的,upperThreshold的默认值好像不起作用你要给他个值
冯强19920120
@冯强19920120
冯强19920120 发布的帖子
-
RE: ScrollView上拉加载更多和下拉刷新不起作用
-
RE: ScrollView上拉加载更多和下拉刷新不起作用
@Taro-小助手-honly 高度没有设置,我用的是flex布局ScrollView用的是flex:1,整体高度是100%
<View className='yd-voucher'>
<View className='yd-voucher-header'>
<Text>优惠券</Text>
</View>
<View className='yd-voucher-navbar'>
<View onClick={this.handleNoverUsed} className={this.state.voucherType === 0 ? 'yd-voucher-nav-noverUsed-active yd-voucher-nav-noverUsed' : 'yd-voucher-nav-noverUsed'}>未使用</View>
<View onClick={this.handleHasUsed} className={this.state.voucherType === 1 ? 'yd-voucher-nav-hasUsed-active yd-voucher-nav-hasUsed' : 'yd-voucher-nav-hasUsed'}>已使用</View>
<View onClick={this.handleOverdue} className={this.state.voucherType === 2 ? 'yd-voucher-nav-overdue-active yd-voucher-nav-overdue' : 'yd-voucher-nav-overdue'}>已过期</View>
</View>
<ScrollView scrollY upperThreshold={20} onScrollToUpper={this.toRefresh.bind(this)} lowerThreshold={20} onScrollToLower={this.toLoadMore.bind(this)} className='ydx-voucher-tab'>
<View className={this.state.voucherType === 0 ? 'ydx-voucher-noverUsed-content pt-page-rotateRoomTopIn' : this.state.voucherType === 1 ? 'ydx-voucher-hasUsed-content pt-page-rotateRoomTopIn ydx-voucher-transparent' : 'ydx-voucher-overdue-content pt-page-rotateRoomTopIn ydx-voucher-transparent'}>
{voucherListEle}
</View>
</ScrollView>
</View>