mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
docs: Table Basic usage - English Translation (#3256)
This commit is contained in:
parent
7a40f8f200
commit
e9ba1e83c7
@ -17,29 +17,29 @@ Simple table with operations.
|
||||
import { Table, Icon } from 'antd';
|
||||
|
||||
const columns = [{
|
||||
title: '姓名',
|
||||
title: 'Name',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
render: text => <a href="#">{text}</a>,
|
||||
}, {
|
||||
title: '年龄',
|
||||
title: 'Age',
|
||||
dataIndex: 'age',
|
||||
key: 'age',
|
||||
}, {
|
||||
title: '住址',
|
||||
title: 'Address',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
}, {
|
||||
title: '操作',
|
||||
title: 'Operation',
|
||||
key: 'operation',
|
||||
render: (text, record) => (
|
||||
<span>
|
||||
<a href="#">操作一{record.name}</a>
|
||||
<a href="#">Operation 一 {record.name}</a>
|
||||
<span className="ant-divider" />
|
||||
<a href="#">操作二</a>
|
||||
<a href="#">Next operation</a>
|
||||
<span className="ant-divider" />
|
||||
<a href="#" className="ant-dropdown-link">
|
||||
更多 <Icon type="down" />
|
||||
More <Icon type="down" />
|
||||
</a>
|
||||
</span>
|
||||
),
|
||||
@ -47,19 +47,19 @@ const columns = [{
|
||||
|
||||
const data = [{
|
||||
key: '1',
|
||||
name: '胡彦斌',
|
||||
name: 'John Brown',
|
||||
age: 32,
|
||||
address: '西湖区湖底公园1号',
|
||||
address: 'New York No. 1 Lake Park',
|
||||
}, {
|
||||
key: '2',
|
||||
name: '胡彦祖',
|
||||
name: 'Jim Green',
|
||||
age: 42,
|
||||
address: '西湖区湖底公园1号',
|
||||
address: 'London No. 1 Lake Park',
|
||||
}, {
|
||||
key: '3',
|
||||
name: '李大嘴',
|
||||
name: 'Joe Black',
|
||||
age: 32,
|
||||
address: '西湖区湖底公园1号',
|
||||
address: 'Sidney No. 1 Lake Park',
|
||||
}];
|
||||
|
||||
ReactDOM.render(<Table columns={columns} dataSource={data} />, mountNode);
|
||||
|
Loading…
Reference in New Issue
Block a user