美文网首页
Each record in table should have

Each record in table should have

作者: 亭止 | 来源:发表于2017-04-05 15:53 被阅读5432次

在一个页面上展示多个页面内容,将要修改的部分封装出来,用判断来选择展示

Warning: Each record in table should have a unique `key` prop,or set `rowKey` to an unique primary key.

按照React 的规范,所有的组件数组必须绑定 key。在 Table 中,dataSource和columns里的数据值都需要指定key值。对于dataSource默认将每列数据的key属性作为唯一的标识。

如果你的数据没有这个属性,务必使用rowKey来指定数据列的主键。若没有指定,控制台会出现以下的提示,表格组件也会出现各类奇怪的错误。

// 比如你的数据主键是 uidreturn;// 或returnrecord.uid}/>;

dataIndex的值对应data的键

相关文章

网友评论

      本文标题:Each record in table should have

      本文链接:https://www.haomeiwen.com/subject/alutattx.html