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} /> + + 页 +