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