Warning: Each record in table should have a unique `key` prop,or set `rowKey` to an unique primary key.
Warning: [antd: Table] Each record in dataSource of table should have a unique `key` prop, or set `rowKey` of Table to an unique primary key, see /table-row-key
在Table组件中加入rowKey属性即可:
<Table columns={columns} dataSource={tableData} rowSelection={rowSelection} rowKey={row=>}/>
同时每条数据需要有个id:
const data = [{
id: '1',
user: 'John Brown',
address: 'New York No. 1 Lake Park',
}, {
id: '2',
user: 'Jim Green',
address: 'London No. 1 Lake Park',
}, {
id: '3',
user: 'Joe Black',
address: 'Sidney No. 1 Lake Park',
}];