mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
docs: Table Checkbox props - English Translation (#3258)
This commit is contained in:
parent
2ddc2fc583
commit
94f2d08978
@ -17,37 +17,37 @@ Set props to Checkbox or Radio.
|
||||
import { Table } from 'antd';
|
||||
|
||||
const columns = [{
|
||||
title: '姓名',
|
||||
title: 'Name',
|
||||
dataIndex: 'name',
|
||||
render: text => <a href="#">{text}</a>,
|
||||
}, {
|
||||
title: '年龄',
|
||||
title: 'Age',
|
||||
dataIndex: 'age',
|
||||
}, {
|
||||
title: '住址',
|
||||
title: 'Address',
|
||||
dataIndex: 'address',
|
||||
}];
|
||||
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',
|
||||
}];
|
||||
|
||||
// 通过 rowSelection 对象表明需要行选择
|
||||
// rowSelection object indicates the need for row selection
|
||||
const rowSelection = {
|
||||
getCheckboxProps: record => ({
|
||||
disabled: record.name === '胡彦祖', // 配置无法勾选的列
|
||||
disabled: record.name === 'Jim Green', // Column configuration not to be checked
|
||||
}),
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user