报错 | Each record in table should have a unique `key` prop,or set `rowKey` to an unique primary key

在使用Ant Design Vue的表格组件时遇到警告:Each record in table should have a unique `key` prop, or set `rowKey` to an unique primary key. 解决方法是在每一列数据上添加key属性,或者为A-Table设置rowKey,并确保其值为唯一的主键。" 103841844,8733709,在Linux上安装Git详细指南,"['Linux开发', '版本控制', 'Git']
摘要由CSDN通过智能技术生成

warning.js?2149:7 Warning: [antdv: Each record in table should have a unique `key` prop,or set `rowKey` to an unique primary key.]

//这里的代码报了上面的错

<template>
  <div>
      <a-table
        ref="table"
        size="default"
        :columns="columns"
        :data-source="cute"
        :pagination="paginationOne"
      >
      </a-table>
  </div>
</template>
<script>
//这些差不多占位 省略具体内容 不影响观看效果
import {..}....

export default {
  components: {
    Ellipsis
  },
   data () {
      return {
		  columns: [
		          {
		            title: '午餐',
		            dataIndex: 'wucan',
		          },
				  {
				    title: '价格',
				    dataIndex: 'jiage',
				  },{
					 title: '分量',
					 dataIndex: 'fenliang',
				  }
				  ],
                 cute:[],
                 paginationOne:
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值