feat: 🎸 优化了滚动加载

This commit is contained in:
2025-08-21 00:10:13 +08:00
parent a493f2773c
commit 62bcb403f9
4 changed files with 33 additions and 3 deletions

View File

@@ -42,6 +42,7 @@ const ProjectLibrary = () => {
page: pageNum ?? page,
pageSize: PAGE_SIZE,
});
console.log(res);
if (res.success) {
setProjectList((prevList) => {
const newList = [...prevList, ...res.data];
@@ -72,6 +73,7 @@ const ProjectLibrary = () => {
loadMore={fetchProjects}
hasMore={hasMore}
threshold={100}
empty={projectList.length === 0}
className="user-portfolio-list"
>
{projectList.map((item) => (