fix:[FL-157][搜索无结果时保持分页组件显示]
- 设置分页total最小值为1,确保即使数据为0时分页组件也显示 - showTotal显示真实的数据条数,不受最小值影响 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -748,10 +748,10 @@ export default function AdminUsersPage() {
|
||||
pagination={{
|
||||
current: pagination.current,
|
||||
pageSize: pagination.pageSize,
|
||||
total: usersQuery.data?.total ?? 0,
|
||||
total: Math.max(usersQuery.data?.total ?? 0, 1),
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: [10, 20, 50, 100],
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
showTotal: (total) => `共 ${usersQuery.data?.total ?? 0} 条`,
|
||||
hideOnSinglePage: false,
|
||||
style: { marginBottom: 0 },
|
||||
onChange: (page, pageSize) => {
|
||||
|
||||
Reference in New Issue
Block a user