b-app-table

1.2.8 • Public • Published

基于 antd table 的二次封装

#Example

yarn start


#Used

import AppTable from "b-app-table"

...

<AppTable
  ref={ref => (this.tableRef = ref)}
  page={1}
  rowKey="id"
  columns={this.columns}
  options={this.state.filterOptions}
  tableOptions={this.state.tableOptions}
  request={this.getList}
/>

指定一个 col 的 sorter,设置其 type 为'sort', options 设置排序参数,此排序为后端排序.

options 是 table 查询条件,对象.

tableOptions 是 table 状态,包括 page,size,sort 等,对象.

getList 是请求 dataSource 的接口函数,接收一个当前查询条件为参数,返回为:

 {
   list:[],//table data
   total:100
 }

#Publish

yarn publish

Package Sidebar

Install

npm i b-app-table

Weekly Downloads

0

Version

1.2.8

License

MIT

Unpacked Size

400 kB

Total Files

13

Last publish

Collaborators

  • method123