diff --git a/src/pages/system/Group.tsx b/src/pages/system/Group.tsx index 3d7fcd1..fb8536e 100644 --- a/src/pages/system/Group.tsx +++ b/src/pages/system/Group.tsx @@ -36,7 +36,11 @@ const Group: React.FC = () => { pagination: { current: 1, pageSize: 20, - position: ['bottomCenter'] + position: ['bottomCenter'], + showTotal: (total, range) => + `第 ${ + range[0] === range[1] ? `${range[0]}` : `${range[0]}~${range[1]}` + } 项 共 ${total} 项` } }) const [searchName, setSearchName] = useState('') @@ -138,6 +142,7 @@ const Group: React.FC = () => { filters: Record, sorter: _SorterResult | _SorterResult[] ) => { + pagination = { ...tableParams.pagination, ...pagination } if (Array.isArray(sorter)) { setTableParams({ pagination, diff --git a/src/pages/system/Log.tsx b/src/pages/system/Log.tsx index 7230211..d16fe8c 100644 --- a/src/pages/system/Log.tsx +++ b/src/pages/system/Log.tsx @@ -19,7 +19,11 @@ const Log: React.FC = () => { pagination: { current: 1, pageSize: 20, - position: ['bottomCenter'] + position: ['bottomCenter'], + showTotal: (total, range) => + `第 ${ + range[0] === range[1] ? `${range[0]}` : `${range[0]}~${range[1]}` + } 项 共 ${total} 项` } }) const [searchRequestUrl, setSearchRequestUrl] = useState('') @@ -134,6 +138,7 @@ const Log: React.FC = () => { filters: Record, sorter: _SorterResult | _SorterResult[] ) => { + pagination = { ...tableParams.pagination, ...pagination } if (Array.isArray(sorter)) { setTableParams({ pagination, diff --git a/src/pages/system/Role.tsx b/src/pages/system/Role.tsx index f0ea4ce..8594664 100644 --- a/src/pages/system/Role.tsx +++ b/src/pages/system/Role.tsx @@ -36,7 +36,11 @@ const Role: React.FC = () => { pagination: { current: 1, pageSize: 20, - position: ['bottomCenter'] + position: ['bottomCenter'], + showTotal: (total, range) => + `第 ${ + range[0] === range[1] ? `${range[0]}` : `${range[0]}~${range[1]}` + } 项 共 ${total} 项` } }) const [searchName, setSearchName] = useState('') @@ -130,6 +134,7 @@ const Role: React.FC = () => { filters: Record, sorter: _SorterResult | _SorterResult[] ) => { + pagination = { ...tableParams.pagination, ...pagination } if (Array.isArray(sorter)) { setTableParams({ pagination, diff --git a/src/pages/system/User.tsx b/src/pages/system/User.tsx index 44e10b6..a8df683 100644 --- a/src/pages/system/User.tsx +++ b/src/pages/system/User.tsx @@ -56,7 +56,11 @@ const User: React.FC = () => { pagination: { current: 1, pageSize: 20, - position: ['bottomCenter'] + position: ['bottomCenter'], + showTotal: (total, range) => + `第 ${ + range[0] === range[1] ? `${range[0]}` : `${range[0]}~${range[1]}` + } 项 共 ${total} 项` } }) const [tableSelectedItem, setTableSelectedItem] = useState([]) @@ -214,6 +218,7 @@ const User: React.FC = () => { filters: Record, sorter: _SorterResult | _SorterResult[] ) => { + pagination = { ...tableParams.pagination, ...pagination } if (Array.isArray(sorter)) { setTableParams({ pagination,