From ebff6eb647ff436cb52b7c3232e8ad2cbb0d621e Mon Sep 17 00:00:00 2001 From: ditiqi Date: Sun, 2 Mar 2025 21:25:28 +0800 Subject: [PATCH] add --- apps/web/src/app/main/layout/MainFooter.tsx | 4 ++-- apps/web/src/components/models/post/PostCard.tsx | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/web/src/app/main/layout/MainFooter.tsx b/apps/web/src/app/main/layout/MainFooter.tsx index b232752..eb4ef75 100755 --- a/apps/web/src/app/main/layout/MainFooter.tsx +++ b/apps/web/src/app/main/layout/MainFooter.tsx @@ -26,13 +26,13 @@ export function MainFooter() {
- 628118 + 628532
- gcsjs6@tx3l.nb.kj + ruanjian1@tx3l.nb.kj
diff --git a/apps/web/src/components/models/post/PostCard.tsx b/apps/web/src/components/models/post/PostCard.tsx index eb9f51e..6aa4b03 100644 --- a/apps/web/src/components/models/post/PostCard.tsx +++ b/apps/web/src/components/models/post/PostCard.tsx @@ -13,6 +13,11 @@ const { Title } = Typography; export default function PostCard({ post, onClick }: PostCardProps) { const handleClick = (post: PostDto) => { onClick?.(post); + // 添加平滑滚动到顶部 + window.scrollTo({ + top: 0, + behavior: "smooth", // 关键参数,启用平滑滚动 + }); }; return (