From b2ec38ec085f9c5af4b2d1fa67ae403157c32873 Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Fri, 28 Apr 2023 15:17:58 +0800 Subject: [PATCH] =?UTF-8?q?4.28=20=E9=AB=98=E8=B4=A8=E9=87=8F=E8=BF=90?= =?UTF-8?q?=E8=90=A5=E4=BF=AE=E6=94=B9=E8=AF=84=E8=AE=BA=E5=8F=91=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/HighQualityOperation/Detail.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/HighQualityOperation/Detail.tsx b/src/pages/HighQualityOperation/Detail.tsx index 1724151..c2b5842 100644 --- a/src/pages/HighQualityOperation/Detail.tsx +++ b/src/pages/HighQualityOperation/Detail.tsx @@ -77,6 +77,7 @@ const Detail: React.FC = (props) => { }) } const getCommentList = (reId: string, count: number) => { + if (listRef.current) { listRef.current.scrollTo({ top: 0 }); } const array = [...new Array(count)].map(() => ({ loading: true, createrName: "", context: "", createTime: "" })); setCommentList(array.concat(commentRef.current)); setLoading(true); @@ -118,7 +119,6 @@ const Detail: React.FC = (props) => { } else if (data.length > 2) { count = data.length + 2; } - if (listRef.current) { listRef.current.scrollTo({ top: 0 }); } getCommentList(reId, count); } }