Skip to content

TablePro

TablePro 组件是对 ant-design-vue 的 Table 的二次封装的组件,内置 selection 以及 拖拽排序

Props

属性类型描述
columnsColumns表格的列配置
borderedboolean是否显示边框
totalnumber数据总数
dataSourceArray<any>表格的数据源
loadData(params: {current: number, pageSize: number}) => void加载数据的函数
rowSelectionRowSelectionnull
rowKeystring行的唯一标识的键名
paginationPagination分页配置

RowSelection

ts
interface RowSelection<T, K> {
  selectedRowKeys: K[]
  selectedRows: T[]
  onChange: (selectedRowKeys: K[], selectedRows: T[]) => void
}

Pagination

ts
interface Pagination {
  showSizeChanger: boolean
  showQuickJumper: boolean
  showTotal: (total: number) => string
  onChange: (page: number, pageSize: number) => void
  onShowSizeChange: (current: number, size: number) => void
}