react+antd:Warning: Each record in table should have a unique `key` prop,or set `rowKey` to an uniqu

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 https://u.ant.design/table-row-key

在Table组件中加入rowKey属性便可:antd

<Table columns={columns} dataSource={tableData}  rowSelection={rowSelection} rowKey={row=>row.id}/>

同时每条数据须要有个id:code

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',
          }];