29 lines
622 B
JavaScript
29 lines
622 B
JavaScript
import React from "react";
|
|
import { DotLoading } from "antd-mobile";
|
|
import Empty from "@/components/Empty";
|
|
export default function InfiniteScrollContent({
|
|
hasMore,
|
|
isEmpty,
|
|
showNoMore = true,
|
|
}) {
|
|
return (
|
|
<>
|
|
{hasMore ? (
|
|
<>
|
|
<span>加载中</span>
|
|
<DotLoading />
|
|
</>
|
|
) : !showNoMore ? null : !isEmpty ? (
|
|
<span>没有更多了</span>
|
|
) : (
|
|
<div
|
|
className={`flex flex-col items-center mt-28`}
|
|
// style={{ height: `${scrollHeight}px` }}
|
|
>
|
|
<Empty type="nodata" />
|
|
</div>
|
|
)}
|
|
</>
|
|
);
|
|
}
|