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

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

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

错误原因:表格中的表一条数据都应该有一个key或者rowkey

解决方法:

在设置table格式的位置加入:rowKey="(record,index)=>{return index}",如下所示:
<a-table
:columns="tableCols"
:data-source="tableData"
:rowKey="(record,index)=>{return index}"
>
<a slot="a2" slot-scope="text">{{ text }}</a>
</a-table>

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

上一篇:基于Windows 7(本地)和CentOS7.6(云端)的Minecraft服务器(无Forge/有Forge)搭建方法


下一篇:Vasya and Golden Ticket