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 : 1name : 'hello'email : 'qq@qq.com'id : 2name : 'admin'email : 'admin@qq.com'//组件支持html格式let action =className : 'col-action clearfix'type : 'html'click : thishandleclickvalue : ''let label = '<a class="label '+'add'+'"' + ' data-status="' + '1'+'">' +'添加'+'</a>'actionvalue = labellet cdata = 1"hello""qq@qq.com"action2"admin""admin@qq.com"action<Table columns=columns tdata=cdata></Table>