ant Table 渲染完数据后控制台一直报错误

报错信息: Each child in a list should have a unique "key" prop.Check the render method of `Body`. See

意思:列表中的每个子元素都应该有一个唯一的“key”道具。
检查“Body”的渲染方法

就是我们没有给每一个列表一个key,会导致渲染和获取消耗变多

解决方法:

 用for in 循环插入一条数据,名称为’key‘,值得话随便给(i,id,name)都可以只要不重复

猜你喜欢

转载自blog.csdn.net/m0_72196169/article/details/130542663
今日推荐