订单列表页面完成

This commit is contained in:
2022-05-19 20:31:53 +08:00
parent 7e5481a7e1
commit f30e174e3e
35 changed files with 1008 additions and 62 deletions
@@ -1,7 +1,6 @@
.scroll_main{
height: 100%;
.infinite_scroll{
font-size: $font_size_medium;
color: $color_font_two;
@@ -13,4 +12,7 @@
align-items: center;
}
}
.scrollViewCon {
// height: 100%;
}
}
+8 -4
View File
@@ -2,12 +2,14 @@ import { ScrollView, View } from "@tarojs/components"
import { memo, ReactNode, useState } from "react"
import style from "./index.module.scss"
import DotLoading from "@/components/dotLoading"
import LoadingCard from "../loadingCard"
type Params = {
styleObj?: Object,
selfonScrollToLower?: () => void,
hasMore?: false|true,
moreStatus?: false|true,
statusMore?: 0|1|2, //0:没数据加载,1:下拉加载,2:没有数据
children?: ReactNode,
lowerThresholdNum?: number,
selfOnScrollToUpper?:() => void
@@ -35,7 +37,8 @@ export default memo(({
paddingBottom = 0,
refresherTriggered = false,
refresherEnabled = false,
moreStatus = true
moreStatus = true,
statusMore = 0
}: Params) => {
const scrollToLower = () => {
selfonScrollToLower?.()
@@ -77,7 +80,7 @@ export default memo(({
onRefresherAbort = {() => refresherAbort()}
refresherBackground ='#F8F8F8'
>
<View style={{paddingBottom:paddingBottom + 'rpx'}}>
{(statusMore != 0)&&<View style={{paddingBottom:paddingBottom + 'rpx'}} className={style.scrollViewCon}>
{children}
{moreStatus&&<View className={style.infinite_scroll}>
{
@@ -85,8 +88,9 @@ export default memo(({
<View>没有更多数据了</View>
}
</View>}
</View>
</View>||
<LoadingCard/>
}
<View className="common_safe_area_y"></View>
</ScrollView>