tiefen_space_h5/components/InfiniteScrollContent/index.jsx

29 lines
624 B
React
Raw Permalink Normal View History

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({
2024-07-31 14:46:03 +08:00
hasMore=0,
2024-07-30 22:53:41 +08:00
isEmpty,
showNoMore = true,
}) {
return (
<>
{hasMore ? (
<>
<span>加载中</span>
<DotLoading />
</>
2024-07-30 22:53:41 +08:00
) : !showNoMore ? null : !isEmpty ? (
<span>没有更多了</span>
) : (
<div
className={`flex flex-col items-center mt-28`}
// style={{ height: `${scrollHeight}px` }}
>
<Empty type="nodata" />
</div>
)}
</>
);
}