刷新问题
This commit is contained in:
parent
44e5df6bd9
commit
1b5d4ef0af
|
@ -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]
|
||||
|
@ -321,8 +321,8 @@ const FollowPostList = forwardRef(({ scrollHeight }, ref) => {
|
|||
))}
|
||||
{!followPostList?.length && (
|
||||
<div
|
||||
className={`flex flex-col items-center justify-center h-screen`}
|
||||
// style={{ height: `${scrollHeight - 98}px` }}
|
||||
className={`flex flex-col items-center justify-center h-screen`}
|
||||
style={{ height: `calc(100vh - 133px)` }}
|
||||
>
|
||||
<Empty type="nodata" />
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue