分类筛选优化
This commit is contained in:
@@ -9,9 +9,9 @@ type Params = {
|
||||
hasMore?: false|true,
|
||||
children?: ReactNode,
|
||||
lowerThresholdNum?: number,
|
||||
|
||||
paddingBottom?: number
|
||||
}
|
||||
export default memo(({styleObj, selfonScrollToLower, hasMore=true, children, lowerThresholdNum = 5}: Params) => {
|
||||
export default memo(({styleObj, selfonScrollToLower, hasMore=true, children, lowerThresholdNum = 5, paddingBottom = 0}: Params) => {
|
||||
const scrollToLower = () => {
|
||||
selfonScrollToLower?.()
|
||||
}
|
||||
@@ -24,15 +24,16 @@ export default memo(({styleObj, selfonScrollToLower, hasMore=true, children, low
|
||||
onScrollToLower={() => scrollToLower()}
|
||||
lowerThreshold={lowerThresholdNum}
|
||||
>
|
||||
<View>
|
||||
<View style={{paddingBottom:paddingBottom + 'rpx'}}>
|
||||
{children}
|
||||
<View className={style.infinite_scroll}>
|
||||
{
|
||||
hasMore&&<View className={style.loading_more}>加载中<DotLoading/></View>||
|
||||
<View>没有更多了</View>
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
<View className={style.infinite_scroll}>
|
||||
{
|
||||
hasMore&&<View className={style.loading_more}>加载中<DotLoading/></View>||
|
||||
<View>没有更多了</View>
|
||||
}
|
||||
</View>
|
||||
|
||||
<View className="common_safe_area_y"></View>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user