当前位置:网站首页>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
2022-07-27 17:28:00 【qwe122343】
用了 Ant Design Vue 之后,遇到了一些 iView 中没遇到过的问题,只能一个一个解决。在使用 Table 组件渲染后台返回数据时,提示 antdv: Each record in table should have a unique key prop,or set rowKey to an unique primary key
大致意思就是表格里每条数据都需要一个 key,只能满足它的要求 =_=
原来的 a-table
<a-table :dataSource="data1.data" :columns="columns" bordered :pagination="false">
</a-table>
现在的 a-table,其实就是加上 rowKey="id"
<a-table :dataSource="data1.data" :columns="columns" bordered :pagination="false" rowKey="id">
</a-table>
这个 id 需要是后台数据返回的那个 id
:rowKey=‘record=>record.id’ 这种写法也没问题
边栏推荐
- 2022爱分析·智慧社区厂商全景报告 厂商征集
- Oracle XE版安装与用户操作
- [basic knowledge of deep learning - 42] detailed explanation of logistic regression
- [论文阅读] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation
- Object常用方法学习【clone和equals】
- UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xff in position 0: invalid start byte
- In a real case, college students were cheated when taking orders. I hope you won't be cheated [painful lesson]
- Version announcement | Apache Doris 1.1 release version officially released!
- 内置模块10.18
- 真实案例,大学生接单被骗,希望大家不要被骗了【惨痛教训】
猜你喜欢

注入攻击

Global function

Togglebutton (button switch)

Marqueetextview (running lantern)

ECU的软硬件架构

探索新一代活动获客方式,虚拟化活动棋胜一招 | 厂商征集

Datepicker and TimePicker

VLAN test 2021.1.14

VirtualBox: set shared folder

Adults have only one main job, but they have to pay a price. I was persuaded to step back by personnel, and I cried all night
随机推荐
Install Talib Library under Anaconda
sqlite创建表联合主键的sql写法
Radiogroup (radio box)
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xff in position 0: invalid start byte
注入攻击
顶级“黑客”能厉害到什么地步?无信号也能上网,专家:高端操作!
Turn Hyper-V on and off
电容串联与并联以及电容串联与平衡电阻
NAT 11.16
贪心
SQLite SQL writing method of creating table joint primary key
Fabric上搭建Hyperledger caliper进行性能测试
JS 寻找所有节点sibling childNodes children
[IOT] Wei Peng: Interpretation of 6000 + words | seven necessary product management tools for product people in 2022 (version 1.0)
Detailed explanation of the underlying data structure of redis
What's new in helix QAC 2022.2, the ace code static testing tool (2)
MVCC的底层原理
Basic functions of pytorch tensor
In a real case, college students were cheated when taking orders. I hope you won't be cheated [painful lesson]
访问控制