刷新问题

This commit is contained in:
al 2024-08-13 16:00:40 +08:00
parent 44e5df6bd9
commit 1b5d4ef0af
1 changed files with 4 additions and 4 deletions

View File

@ -239,6 +239,7 @@ const FollowPostList = forwardRef(({ scrollHeight }, ref) => {
left: 0,
behavior: "smooth", // 可选,平滑滚动效果
});
// setFollowPostList([]);
await getFollowPostList(ids.current, 0);
}
async function loadMore() {
@ -288,8 +289,7 @@ const FollowPostList = forwardRef(({ scrollHeight }, ref) => {
} else {
setFollowPostList((old) => {
if(followsResponse.data.offset==4){
if(!offset){
return followsResponse.data.list;
}else{
return [...old, ...followsResponse.data.list]
@ -322,7 +322,7 @@ const FollowPostList = forwardRef(({ scrollHeight }, ref) => {
{!followPostList?.length && (
<div
className={`flex flex-col items-center justify-center h-screen`}
// style={{ height: `${scrollHeight - 98}px` }}
style={{ height: `calc(100vh - 133px)` }}
>
<Empty type="nodata" />
</div>