2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 10
|
|
|
|
title: 边框
|
|
|
|
---
|
2015-08-11 20:05:52 +08:00
|
|
|
|
2015-11-25 17:47:55 +08:00
|
|
|
添加表格边框线,`bordered`。
|
2015-08-11 20:05:52 +08:00
|
|
|
|
2016-03-31 09:40:55 +08:00
|
|
|
|
2015-08-11 20:05:52 +08:00
|
|
|
|
|
|
|
````jsx
|
2015-10-28 20:55:49 +08:00
|
|
|
import { Table } from 'antd';
|
|
|
|
|
|
|
|
const columns = [{
|
2015-08-11 20:05:52 +08:00
|
|
|
title: '姓名',
|
|
|
|
dataIndex: 'name',
|
2016-02-17 15:57:33 +08:00
|
|
|
render(text) {
|
2015-11-25 17:35:49 +08:00
|
|
|
return <a href="#">{text}</a>;
|
2015-08-11 20:05:52 +08:00
|
|
|
}
|
|
|
|
}, {
|
2015-11-05 19:46:29 +08:00
|
|
|
title: '资产',
|
|
|
|
className: 'column-money',
|
|
|
|
dataIndex: 'money'
|
2015-08-11 20:05:52 +08:00
|
|
|
}, {
|
|
|
|
title: '住址',
|
|
|
|
dataIndex: 'address'
|
|
|
|
}];
|
|
|
|
|
2015-10-28 20:55:49 +08:00
|
|
|
const data = [{
|
2015-08-28 15:22:09 +08:00
|
|
|
key: '1',
|
2015-08-11 20:05:52 +08:00
|
|
|
name: '胡彦斌',
|
2015-11-05 19:46:29 +08:00
|
|
|
money: '¥300,000.00',
|
2015-08-11 20:05:52 +08:00
|
|
|
address: '西湖区湖底公园1号'
|
|
|
|
}, {
|
2015-08-28 15:22:09 +08:00
|
|
|
key: '2',
|
2015-08-11 20:05:52 +08:00
|
|
|
name: '胡彦祖',
|
2015-11-05 19:46:29 +08:00
|
|
|
money: '¥1,256,000.00',
|
2015-08-11 20:05:52 +08:00
|
|
|
address: '西湖区湖底公园1号'
|
|
|
|
}, {
|
2015-08-28 15:22:09 +08:00
|
|
|
key: '3',
|
2015-08-11 20:05:52 +08:00
|
|
|
name: '李大嘴',
|
2015-11-05 19:46:29 +08:00
|
|
|
money: '¥120,000.00',
|
2015-08-11 20:05:52 +08:00
|
|
|
address: '西湖区湖底公园1号'
|
|
|
|
}];
|
|
|
|
|
2015-11-25 17:47:55 +08:00
|
|
|
ReactDOM.render(<Table columns={columns} dataSource={data} bordered />
|
2015-12-29 12:08:58 +08:00
|
|
|
, mountNode);
|
2015-08-11 20:05:52 +08:00
|
|
|
````
|
2015-11-05 19:46:29 +08:00
|
|
|
|
|
|
|
````css
|
|
|
|
.column-money {
|
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
````
|