🌈 style(eslint): 修复eslint的报错❌
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ScrollView, View } from '@tarojs/components'
|
||||
import type { ReactNode } from 'react'
|
||||
import type { ReactNode } from 'react'
|
||||
import { memo, useMemo, useState } from 'react'
|
||||
import LoadingCard from '../loadingCard'
|
||||
import style from './index.module.scss'
|
||||
@@ -25,7 +25,7 @@ interface Params {
|
||||
refresherTriggered?: true|false
|
||||
refresherEnabled?: true|false
|
||||
}
|
||||
export default memo(({
|
||||
const InfiniteScroll = ({
|
||||
styleObj,
|
||||
selfonScrollToLower,
|
||||
selfOnScrollToUpper,
|
||||
@@ -91,28 +91,31 @@ export default memo(({
|
||||
refresherBackground="#F8F8F8"
|
||||
scrollTop={scrollTop}
|
||||
>
|
||||
{!moreStatus && <>
|
||||
<View style={{ paddingBottom: `${paddingBottom}rpx` }} className={style.scrollViewCon}>
|
||||
{children}
|
||||
</View>
|
||||
</>
|
||||
|| <>
|
||||
{(statusMore == 2 || statusMore == 3) && <View style={{ paddingBottom: `${paddingBottom}rpx` }} className={style.scrollViewCon}>
|
||||
{children}
|
||||
<View className={style.infinite_scroll}>
|
||||
{
|
||||
(statusMore == 2) && <View className={style.loading_more}>加载中<DotLoading /></View>
|
||||
|| <View className={style.noMore}>没有更多数据了</View>
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
}
|
||||
{(statusMore == 0) && <LoadingCard />}
|
||||
{(statusMore == 1) && <LoadingCard loadingIcon={false} title="暂无数据" />}
|
||||
</>}
|
||||
{!moreStatus
|
||||
? <>
|
||||
<View style={{ paddingBottom: `${paddingBottom}rpx` }} className={style.scrollViewCon}>
|
||||
{children}
|
||||
</View>
|
||||
</>
|
||||
: <>
|
||||
{(statusMore == 2 || statusMore == 3) && <View style={{ paddingBottom: `${paddingBottom}rpx` }} className={style.scrollViewCon}>
|
||||
{children}
|
||||
<View className={style.infinite_scroll}>
|
||||
{
|
||||
(statusMore == 2)
|
||||
? <View className={style.loading_more}>加载中<DotLoading /></View>
|
||||
: <View className={style.noMore}>没有更多数据了</View>
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
}
|
||||
{(statusMore == 0) && <LoadingCard />}
|
||||
{(statusMore == 1) && <LoadingCard loadingIcon={false} title="暂无数据" />}
|
||||
</>}
|
||||
|
||||
<View className="common_safe_area_y"></View>
|
||||
</ScrollView>
|
||||
</>
|
||||
)
|
||||
})
|
||||
}
|
||||
export default memo(InfiniteScroll)
|
||||
|
||||
Reference in New Issue
Block a user