reactui-table
v0.0.9
Published
React Table
Downloads
11
Maintainers
Readme
react-table
table组件 在线demo
Installation
npm install reactui-table
API
props
|name|type|default| description| |-----|---|--------|----| |columns | array |- | 表格头部| |tdata | array | -| 表格数据 |
Demo
npm run start
http://localhost:8888/example/
Usage
let columns = ['示例1','示例2','示例3','操作']
let tdata = [{
id : 1,
name : 'hello',
email : '[email protected]'
},{
id : 2,
name : 'admin',
email : '[email protected]'
}]
//组件支持html格式
let action = {
className : 'col-action clearfix',
type : 'html',
click : this.handleclick.bind(this),
value : ''
}
let label = '<a class="label '+'add'+'"' + ' data-status="' + '1'+'">' +'添加'+'</a>'
action.value = label
let cdata = [[1,"hello","[email protected]",action],[2,"admin","[email protected]",action]]
<Table columns={columns} tdata={cdata}></Table>