pref(收藏夹): 显示空状态
This commit is contained in:
@@ -4,6 +4,8 @@ import { memo, useMemo, useState } from 'react'
|
||||
import LoadingCard from '../loadingCard'
|
||||
import style from './index.module.scss'
|
||||
import DotLoading from '@/components/dotLoading'
|
||||
import Empty from '../empty'
|
||||
import { SEARCH_EMPTY_IMAGE } from '@/common/constant'
|
||||
|
||||
export type StatusParam = 0|1|2|3
|
||||
|
||||
@@ -22,8 +24,9 @@ interface Params {
|
||||
selfOnRefresherRestore?: () => void
|
||||
selfOnRefresherAbort?: () => void
|
||||
paddingBottom?: number
|
||||
refresherTriggered?: true|false
|
||||
refresherEnabled?: true|false
|
||||
refresherTriggered?: boolean
|
||||
refresherEnabled?: boolean
|
||||
emptySlot?: React.ReactNode
|
||||
}
|
||||
const InfiniteScroll = ({
|
||||
styleObj,
|
||||
@@ -34,7 +37,7 @@ const InfiniteScroll = ({
|
||||
selfOnRefresherRefresh,
|
||||
selfOnRefresherRestore,
|
||||
selfOnRefresherAbort,
|
||||
hasMore = true,
|
||||
emptySlot,
|
||||
children,
|
||||
lowerThresholdNum = 5,
|
||||
paddingBottom = 0,
|
||||
@@ -110,7 +113,7 @@ const InfiniteScroll = ({
|
||||
</View>
|
||||
}
|
||||
{(statusMore == 0) && <LoadingCard />}
|
||||
{(statusMore == 1) && <LoadingCard loadingIcon={false} title="暂无数据" />}
|
||||
{statusMore == 1 && (emptySlot || <Empty picUrl={SEARCH_EMPTY_IMAGE} text="暂无数据" />)}
|
||||
</>}
|
||||
|
||||
<View className="common_safe_area_y"></View>
|
||||
|
||||
Reference in New Issue
Block a user