antd for vue table组件key报错
Warning: [antdv: Each record in table should have a unique key
prop,or set rowKey
to an unique primary key.]
Warning: [antdv: Table] Each record in dataSource of table should have a unique key
prop, or set rowKey
of Table to an unique primary key
在vue中解决办法:
:row-key="(r, i) => i.toString()"
<a-table :row-key="(r, i) => i.toString()" :columns="columns" :data-source="costData" :pagination="false" :scroll="{ y: 200 }">