2024-07-15 16:54:04 +08:00
|
|
|
import React from "react";
|
|
|
|
import { DotLoading } from "antd-mobile";
|
|
|
|
import Empty from "@/components/Empty";
|
2024-07-30 22:53:41 +08:00
|
|
|
export default function InfiniteScrollContent({
|
|
|
|
hasMore,
|
|
|
|
isEmpty,
|
|
|
|
showNoMore = true,
|
|
|
|
}) {
|
2024-07-15 16:54:04 +08:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
{hasMore ? (
|
|
|
|
<>
|
|
|
|
<span>加载中</span>
|
|
|
|
<DotLoading />
|
|
|
|
</>
|
2024-07-30 22:53:41 +08:00
|
|
|
) : !showNoMore ? null : !isEmpty ? (
|
2024-07-15 16:54:04 +08:00
|
|
|
<span>没有更多了</span>
|
|
|
|
) : (
|
|
|
|
<div
|
|
|
|
className={`flex flex-col items-center mt-28`}
|
|
|
|
// style={{ height: `${scrollHeight}px` }}
|
|
|
|
>
|
|
|
|
<Empty type="nodata" />
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|