统一后台 Table 分页:常开 10/20/50/100 条数切换
- 新增 admin-pagination 工具,标准列表与云触手记录分别配置 - 用户/审计等页补齐 showSizeChanger,避免 total≤50 时无法切换 - ConfigProvider 默认开启条数切换
This commit is contained in:
@@ -55,6 +55,7 @@ import type {
|
||||
AdminKuaishouFeifeiProductRule,
|
||||
} from '@/types/admin'
|
||||
import { hasAdminRole } from '@/utils/admin-auth'
|
||||
import { buildAdminLocalTablePagination } from '@/utils/admin-pagination'
|
||||
|
||||
type EditableOverrideRule = Omit<AdminCloudtentaclesOverrideRule, 'normalizedProductName'> & {
|
||||
normalizedProductName?: string
|
||||
@@ -666,7 +667,7 @@ function KuaishouFeifeiFulfillmentPanel() {
|
||||
rowKey={(row) => row.id || `${row.productName}-${row.productCode}`}
|
||||
columns={columns}
|
||||
dataSource={rules}
|
||||
pagination={{ pageSize: 20, showSizeChanger: true }}
|
||||
pagination={buildAdminLocalTablePagination()}
|
||||
scroll={{ x: 920, y: 520 }}
|
||||
locale={{ emptyText: '暂无 kuaishou-feifei 商品映射' }}
|
||||
className="platform-section-gap"
|
||||
@@ -1170,7 +1171,7 @@ function KuaishouCloudFulfillmentPanel() {
|
||||
),
|
||||
},
|
||||
]}
|
||||
pagination={{ pageSize: 20, showSizeChanger: true }}
|
||||
pagination={buildAdminLocalTablePagination()}
|
||||
scroll={{ x: 1000, y: 420 }}
|
||||
locale={{ emptyText: '当前账号暂无可展示商品' }}
|
||||
/>
|
||||
|
||||
@@ -77,6 +77,11 @@ import type {
|
||||
AdminScheduledJobsConfig,
|
||||
} from '@/types/admin'
|
||||
import { hasAdminRole } from '@/utils/admin-auth'
|
||||
import {
|
||||
ADMIN_DEFAULT_PAGE_SIZE,
|
||||
buildAdminLocalTablePagination,
|
||||
buildAdminTablePagination,
|
||||
} from '@/utils/admin-pagination'
|
||||
import { formatAdminDateTime } from '@/utils/admin-time'
|
||||
|
||||
type PlatformTab =
|
||||
@@ -441,14 +446,12 @@ function NinetyonePanel({
|
||||
columns={columns}
|
||||
dataSource={data?.items || []}
|
||||
scroll={{ x: 1200 }}
|
||||
pagination={{
|
||||
pagination={buildAdminTablePagination({
|
||||
current: data?.page || 1,
|
||||
pageSize: data?.pageSize || 20,
|
||||
pageSize: data?.pageSize || ADMIN_DEFAULT_PAGE_SIZE,
|
||||
total: data?.total || 0,
|
||||
showSizeChanger: true,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
onChange: (nextPage, nextPageSize) => loadOrders(nextPage, nextPageSize),
|
||||
}}
|
||||
})}
|
||||
/>
|
||||
</Card>
|
||||
)
|
||||
@@ -1469,7 +1472,7 @@ function KuaishouFeifeiPlatformPanel({
|
||||
className="platform-section-gap"
|
||||
rowKey={(row) => row.id || row.productCode || row.productName}
|
||||
dataSource={source.productRules}
|
||||
pagination={{ pageSize: 10, showSizeChanger: true }}
|
||||
pagination={buildAdminLocalTablePagination()}
|
||||
scroll={{ x: 980 }}
|
||||
columns={[
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user