From 378df947a93e0bbf67909af7b9f9411e64a47d62 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Mon, 15 Dec 2025 15:20:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(Pagination):=20=E4=BC=98=E5=8C=96=E4=B8=AD?= =?UTF-8?q?=E9=97=B4=E9=A1=B5=E7=A0=81=E6=98=BE=E7=A4=BA=EF=BC=8C=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E8=B7=B3=E8=BD=AC=E6=96=87=E6=A1=88=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 中间页码:显示当前页前后各1个页码 (如 1...4,5,6...10) - 跳转文案:从"跳转到 [页]"改为"第 [ ] 页"格式 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../components/DynamicNews/PaginationControl.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/views/Community/components/DynamicNews/PaginationControl.js b/src/views/Community/components/DynamicNews/PaginationControl.js index 9e171509..2f807f1b 100644 --- a/src/views/Community/components/DynamicNews/PaginationControl.js +++ b/src/views/Community/components/DynamicNews/PaginationControl.js @@ -60,10 +60,12 @@ const PaginationControl = React.memo(({ currentPage, totalPages, onPageChange }) pageNumbers.push(i); } } else { - // 当前页在中间 + // 当前页在中间:显示当前页前后各1个页码 pageNumbers.push(1); pageNumbers.push('...'); - pageNumbers.push(currentPage); + pageNumbers.push(currentPage - 1); // 前一页 + pageNumbers.push(currentPage); // 当前页 + pageNumbers.push(currentPage + 1); // 后一页 pageNumbers.push('...'); pageNumbers.push(totalPages); } @@ -180,7 +182,7 @@ const PaginationControl = React.memo(({ currentPage, totalPages, onPageChange }) {/* 输入框跳转 */} - 跳转到 + 第 setJumpPage(e.target.value)} onKeyPress={handleKeyPress} - placeholder="页" + placeholder="" bg={buttonBg} borderColor={borderColor} /> + + 页 +