更新navigation里的权限控制 & 更新客户认领查询逻辑
This commit is contained in:
@@ -23,7 +23,7 @@ export type DataTableProps<T> = {
|
||||
data: T[]
|
||||
status: "load" | "done" | "fail"
|
||||
columns: ColumnDef<T>[]
|
||||
pagination: PaginationProps
|
||||
pagination?: PaginationProps
|
||||
classNames?: {
|
||||
root?: string
|
||||
headRow?: string
|
||||
@@ -39,9 +39,9 @@ export function DataTable<T extends Record<string, unknown>>(
|
||||
columns: props.columns,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
manualPagination: true,
|
||||
rowCount: props.pagination.total,
|
||||
rowCount: props.pagination?.total,
|
||||
state: {
|
||||
pagination: {
|
||||
pagination: props.pagination && {
|
||||
pageIndex: props.pagination.page,
|
||||
pageSize: props.pagination.size,
|
||||
},
|
||||
@@ -160,7 +160,7 @@ export function DataTable<T extends Record<string, unknown>>(
|
||||
</div>
|
||||
|
||||
{/* 分页器 */}
|
||||
<Pagination {...props.pagination} />
|
||||
{props.pagination && <Pagination {...props.pagination} />}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user