当前位置:网站首页>Error in render: “TypeError: data.slice is not a function“
Error in render: “TypeError: data.slice is not a function“
2022-07-26 20:03:00 【潮汐未见潮落】
报错信息
Invalid prop: type check failed for prop "dataSource". Expected Array, got Object
Error in render: "TypeError: data.slice is not a function"

使用 ant-design-vue 的 table 组件 ,渲染表格数据报错
解决方法
<a-table
:columns="columnsreply"
:data-source="seldata"
:loading="loading"
childrenColumnName = "1">
</a-table>
表格绑定的数据是数组类型,之前报错是因为给 seldata 直接赋值变成对象类型,需要修改赋值的代码
可以使用 push 方法 ,添加数据到 seldata 中 ,错误解决
之前
seldata=row
改正
seldata.push(row)
报错解决
边栏推荐
- 美司法部律师团队要求法官拒绝受理华为诉讼
- 没有网络怎么配置传奇SF登陆器自动读取列表
- 20220726
- LeetCode_ Backtracking_ Medium_ 216. Combined sum III
- LCP 11. Statistics of expected number
- Execution context and Lexical Environment
- 7.25 simulation summary
- Use Baidu PaddlePaddle easydl to complete garbage classification
- BGP -- Border Gateway Protocol
- Leetcode's question brushing -- List summary
猜你喜欢
随机推荐
How to upload and download files
美国应用材料公司宣布将以22亿美元现金收购国际电气
BGP -- Border Gateway Protocol
Bean injection and lifecycle
LCP 11. 期望个数统计
英国德国相继推出5G商用服务,华为成幕后功臣
Houdini finds the midpoint and connects the points to form a line
Easy gene | introduction to macrovirus sequencing technology
【问题篇】浏览器get请求带token
Build etcd distributed storage system +web management interface from scratch
Confid+etcd to realize automatic discovery of high availability
How to assemble a registry?
serializable接口的作用是什么?
Solve the horizontal segmentation of iBGP and BGP routing principles
BTC和ETH不确定性增强 因加息逼近?美国经济将面临更多痛苦
Using union to sort MySQL
Hello, how are you
Houdini notes 2
Establishment of APP automation testing framework (VIII) -- establishment of ATX server2 multi device cluster environment
消息队列——引入的问题:重复消费&顺序消费&分布式事务









