mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 19:42:54 +08:00
docs: Table - colSpan and rowSpan - English Translation (#3275)
This commit is contained in:
parent
e246b99849
commit
2e4e159ed8
@ -34,7 +34,7 @@ const renderContent = function (value, row, index) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
title: '姓名',
|
title: 'Name',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
render(text, row, index) {
|
render(text, row, index) {
|
||||||
if (index < 4) {
|
if (index < 4) {
|
||||||
@ -48,11 +48,11 @@ const columns = [{
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
title: '年龄',
|
title: 'Age',
|
||||||
dataIndex: 'age',
|
dataIndex: 'age',
|
||||||
render: renderContent,
|
render: renderContent,
|
||||||
}, {
|
}, {
|
||||||
title: '家庭电话',
|
title: 'Home phone',
|
||||||
colSpan: 2,
|
colSpan: 2,
|
||||||
dataIndex: 'tel',
|
dataIndex: 'tel',
|
||||||
render(value, row, index) {
|
render(value, row, index) {
|
||||||
@ -73,51 +73,51 @@ const columns = [{
|
|||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
title: '手机号',
|
title: 'Phone',
|
||||||
colSpan: 0,
|
colSpan: 0,
|
||||||
dataIndex: 'phone',
|
dataIndex: 'phone',
|
||||||
render: renderContent,
|
render: renderContent,
|
||||||
}, {
|
}, {
|
||||||
title: '住址',
|
title: 'Address',
|
||||||
dataIndex: 'address',
|
dataIndex: 'address',
|
||||||
render: renderContent,
|
render: renderContent,
|
||||||
}];
|
}];
|
||||||
|
|
||||||
const data = [{
|
const data = [{
|
||||||
key: '1',
|
key: '1',
|
||||||
name: '胡彦斌',
|
name: 'John Brown',
|
||||||
age: 32,
|
age: 32,
|
||||||
tel: '0571-22098909',
|
tel: '0571-22098909',
|
||||||
phone: 18889898989,
|
phone: 18889898989,
|
||||||
address: '西湖区湖底公园1号',
|
address: 'New York No. 1 Lake Park',
|
||||||
}, {
|
}, {
|
||||||
key: '2',
|
key: '2',
|
||||||
name: '胡彦祖',
|
name: 'Jim Green',
|
||||||
tel: '0571-22098333',
|
tel: '0571-22098333',
|
||||||
phone: 18889898888,
|
phone: 18889898888,
|
||||||
age: 42,
|
age: 42,
|
||||||
address: '西湖区湖底公园1号',
|
address: 'London No. 1 Lake Park',
|
||||||
}, {
|
}, {
|
||||||
key: '3',
|
key: '3',
|
||||||
name: '李大嘴',
|
name: 'Joe Black',
|
||||||
age: 32,
|
age: 32,
|
||||||
tel: '0575-22098909',
|
tel: '0575-22098909',
|
||||||
phone: 18900010002,
|
phone: 18900010002,
|
||||||
address: '西湖区湖底公园1号',
|
address: 'Sidney No. 1 Lake Park',
|
||||||
}, {
|
}, {
|
||||||
key: '4',
|
key: '4',
|
||||||
name: '李夫人',
|
name: 'Jim Red',
|
||||||
age: 18,
|
age: 18,
|
||||||
tel: '0575-22098909',
|
tel: '0575-22098909',
|
||||||
phone: 18900010002,
|
phone: 18900010002,
|
||||||
address: '西湖区湖底公园1号',
|
address: 'London No. 2 Lake Park',
|
||||||
}, {
|
}, {
|
||||||
key: '5',
|
key: '5',
|
||||||
name: '习大大',
|
name: 'Jake White',
|
||||||
age: 18,
|
age: 18,
|
||||||
tel: '0575-22098909',
|
tel: '0575-22098909',
|
||||||
phone: 18900010002,
|
phone: 18900010002,
|
||||||
address: '西湖区湖底公园1号',
|
address: 'Dublin No. 2 Lake Park',
|
||||||
}];
|
}];
|
||||||
|
|
||||||
ReactDOM.render(<Table columns={columns} dataSource={data} bordered />
|
ReactDOM.render(<Table columns={columns} dataSource={data} bordered />
|
||||||
|
Loading…
Reference in New Issue
Block a user