react antd5 Warning: Each child in a list should have a unique "key" prop.

DL-CODER / 2023-07-27 / 原文

Warning: Each child in a list should have a unique "key" prop.

说明:表格数据赋值给一个 key 值

<Table columns={columns} dataSource={data.map((item) => ({ ...item, key: item.id }))} />