当前位置:网站首页>[antdv: Each record in table should have a unique `key` prop,or set `rowKey` to an unique.....
[antdv: Each record in table should have a unique `key` prop,or set `rowKey` to an unique.....
2022-07-17 05:12:00 【Dayaer】
vue antdesign 使用表格组件时控制台报警告,原因是缺少唯一的id,搜集了三种方法
报错:
方法一:
// 接口返回数据里有唯一的值
<a-table
:columns="columns"
:data-source="tableData"
:rowKey='record=>record.id'>
</a-table>
方法二 :(和方法一道理一样,都是取的数据里的id来做唯一值)
<a-table
:columns="columns"
:data-source="tableData"
rowKey="id"> // 这里的rowKey不需要冒号
</a-table>
如果接口返回的数据列表没有可以区分的唯一的值,可以用此方法
方法三:
<a-table
:columns="columns"
:data-source="tableData"
:rowKey="(record,index)=>{return index}">
</a-table>
边栏推荐
- Speed sensor signal isolation, acquisition and transformation, sine wave and sawtooth wave signal input, square wave signal output, signal converter
- Composition of wechat applet code
- VSCode 即时英文翻译插件 【翻译(英汉词典)】
- Unable to determine Electron version. Please specify an Electron version
- 单片机的好搭档-CS创世SD NAND FLASH
- vscode 配置golang开发环境
- 三星系列NAND Flash有什么区别?
- Thermal resistance PT100 cu50 isolation converter to 4-20mA analog output temperature transmitter 0-10V
- 3.7V锂电池升压到5V1A,FS2114升压转换芯片设计布局
- Hm9922 switching buck LED constant current driver IC
猜你喜欢

分享CS品牌贴片式T卡在打猎相机领域的运用案例

Wireless charging mouse pad RGB LED lighting wireless charging mouse pad

新产品如何选型Flash?

Thermal resistance PT100 cu50 isolation converter to 4-20mA analog output temperature transmitter 0-10V

Review of software process and management (6)

TP4054充电IC使用技巧---配合中科蓝讯AB5365B使用

Tips for using tp4054 charging IC -- used in conjunction with Zhongke Lanxun ab5365b

MCU的最佳存储方案CS创世 SD NAND

CS品牌SD NAND在空气质量检测行业中的应用案例

单片机的好搭档-CS创世SD NAND FLASH
随机推荐
自动补全 & (自定义)拼音分词器 & 搜索时注意事项
[speech recognition] MFCC feature extraction
HM代理商多节锂电充电IC
MySQL workbench basically uses [create a data table]
Darwin 反射总结
0-10V,4-20mA电流电压转PWM隔离转换器 质料以及应用电路图
Fs68001 wireless charging SOC chip has simple periphery and schematic diagram of 5W wireless charging scheme
HT7727 HT7730 HT7733 HT7737 HT7750异步DCDC升压IC
QTSS回调例程
4-20mA to 4-20mA 0-5V to 0-5V analog signal isolation transmitter
CS品牌SDNAND和STM32MCU成功合作资料
[详细教程安装][配置] VsCode中关于Eslint的辅助插件
什么是tSD/qSD?CS创世 SD NAND到底是什么?
分享CS品牌贴片式T卡在打猎相机领域的运用案例
比例阀放大板1A、2A、3A、5A比例阀驱动模块0-10V转0-24V
Introduction to goroutine, a high concurrency feature of golang
转速传感器信号隔离、采集及变换,正弦波、锯齿波信号输入,方波信号输出,信号转换器
String distance problem
4 路 FMC 接口基带信号处理板(2 个FMC接口、2个FMC+接口)
HRA 1~12W 系列12V《宽压9~18V》转±250VDC等升压变换器