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

2020-05-15 22:37:37

解决办法:

(recordindex) => index

这样也可以

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


使用table组件的时候控制台警示:Each record in dataSource of table should have a unique key prop, or set rowKey of Table to an unique primary key,

返回的数据里没有名为key的键值,所以需要在组件上设置这个表是以什么作为key来区别每一行数据的。

解决:

使用row-key属性 (添加row-key="id")

<a-table  row-key="id"   ...  >

      ...

</a-table>



  • 2019-01-08 14:35:50

    ueditor 特殊符号转义

    几个月前,就有同事跟我反馈,说磨途歌的留言板有问题。当时看了一下,她用的是谷歌浏览器,确实打不出中文,才按下一个字母,英文字母就从输入法的输入框中直接跳出来了,更换火狐浏览器就没这个问题。很奇怪的是,在我电脑上的火狐浏览器跟谷歌浏览器都没有问题,一开始还以为是她电脑的问题,就没在意了。

  • 2019-01-12 23:28:58

    NodeJS实现视频转码

    视频转码就是一个先解码,再编码的过程,从而将原来的视频转换成我们需要的视频。这种转换可能包括各式(mp4/avi/flv等)、分辨率、码率、帧率等。