diff --git a/web/src/components/blog-home/blog-home.tsx b/web/src/components/blog-home/blog-home.tsx index e2015e7..bced2e6 100644 --- a/web/src/components/blog-home/blog-home.tsx +++ b/web/src/components/blog-home/blog-home.tsx @@ -68,11 +68,8 @@ export default function BlogHome() { }; const handlePageChange = (page: number) => { - // 修改查询参数和状态 + window.scrollTo({ top: 0, behavior: 'smooth' }); setCurrentPage(page); - // 不滚动到顶部,用户可能在阅读侧边栏 - // window.scrollTo({ top: 0, behavior: 'smooth' }); - // 修改查询参数 const params = new URLSearchParams(searchParams.toString()); params.set('page', page.toString()); const newUrl = `${window.location.pathname}?${params.toString()}`;