vue报错解决Duplicate keys detected: ‘[object Object]’
最近在做vue项目时遇到了报错
Duplicate keys detected: ‘[object Object]’. This may cause an update error.
由于这个问题是第一次遇见,所以在解决起来废了点时间

解决:在遍历数组时 :key书写错误,
我的错误写法
<ul>
<li v-for="v in caseintrocon" :key="i">
<p><em>{{v.data_m_d}}</em>{{v.data_y}}</p>
<p><strong>{{v.title}}</strong></p>
<p>{{v.text_con}}</p>
</li>
</ul>
改正后的写法:
<ul>
<li v-for="(v,i) in caseintrocon" :key="i">
<p><em>{{v.data_m_d}}</em>{{v.data_y}}</p>
<p><strong>{{v.title}}</strong></p>
<p>{{v.text_con}}</p>
</li>
</ul>
总结:平时用修改前的方式写代码也没有出错,这次代码出错给了我个提醒,以后书写代码要更加规范
欢迎来访我的博客,一起学习更多:Plumliil
vue报错解决Duplicate keys detected: ‘[object Object]’的更多相关文章
- vue报错之Duplicate keys detected: '0'. This may cause an update error.
昨天运行vue项目的时候,出现了[Vue warn]: Duplicate keys detected: '0'. This may cause an update error(错误,检测到重复的ke ...
- Python使用suds调用webservice报错解决方法:AttributeError: 'Document' object has no attribute 'set'
使用python的suds包调用webservice服务接口,报错:AttributeError: 'Document' object has no attribute 'set' 调用服务接口代码: ...
- vue 报错解决:TypeError: Cannot read property '_t' of undefined"
前端报错如下: [Vue warn]: Error in render: "TypeError: Cannot read property '_t' of undefined" 是 ...
- Keil 报错解决方法:Cannot link object xxx.o as its attributes are incompatile with the image attributes
链接其他人的lib库时报错:Cannot link object xxx.o as its attributes are incompatile with the image attributes 解 ...
- [Vue warn]: Duplicate keys detected: '0'. This may cause an update error.
1.[Vue warn]: Duplicate keys detected: '0'. This may cause an update error. 第一眼看到这个错误一脸懵逼,项目使用很久了,代码 ...
- django.db.utils.InternalError: (1060, "Duplicate column name 'user_id'")迁移报错解决方法
django.db.utils.InternalError: (1060, "Duplicate column name 'user_id'")迁移报错解决方法 django.db ...
- vue3 报错解决:找不到模块‘xxx.vue’或其相应的类型声明。(Vue 3 can not find module)
最近在用 vue3 写一个小组件库,在 ts 文件中引入 .vue 文件时出现以下报错: 报错原因:typescript 只能理解 .ts 文件,无法理解 .vue文件 解决方法:在项目根目录或 sr ...
- 解决element-ui表格多重嵌套循环时,添加row-key="id" 出现Duplicate keys detected: 'XXX' 错误的问题
Duplicate keys detected: 'XXX' 错误,怀疑是多重嵌套循环时 :key="item.id或index" 不能重复的问题,但设置了不同的 key 后并未解 ...
- vue 项目 npm install 报错解决
node-sass 安装报错解决办法 2017年04月15日 14:34:25 阅读数:20189 E:\kibana>npm install node-sass > node-sass@ ...
- vue报错信息
1.Property or method "xxx" is not defined on the instance but referenced during render. 原因 ...
随机推荐
- Clion+dap仿真器,移植stm32项目
如何将Keil项目移植到Clion,先看几位大佬的文章: 稚晖君的回答:配置CLion用于STM32开发[优雅の嵌入式开发] 野火论坛:DAP仿真器的使用教程 wuxx:nanoDAP使用疑难杂症解析 ...
- Spring Boot 整合 xxl-job
官方文档:https://www.xuxueli.com/xxl-job/ XXL-JOB 是一个分布式任务调度平台,其核心设计目标是开发迅速.学习简单.轻量级.易扩展.现已开放源代码并接入多家公司线 ...
- mysql数据库常见优化方法
1,创建适当的索引(主键索引.唯一索引.普通索引.全文索引.空间索引). 2,对sql语句进行优化--->慢查询(explain). 3,使用分表技术(水平分表,垂直分表),分区技术. 4,读写 ...
- 深入理解 Redis 新特性:Stream
该数据结构需要 Redis 5.0.0 + 版本才可用使用 概述 Redis stream 是 Redis 5 引入的一种新的数据结构,它是一个高性能.高可靠性的消息队列,主要用于异步消息处理和流式数 ...
- 苹果怎么查看UDID iPhone/iPad查看UDID教程【详解】
在开发iPhone和iPad软件的时候,要使用UDID来做真机测试,那么如何查看iPhone或者iPad的UDID呢?下面介绍三种最简单的查看UDID的方法,供大家参考!下面就详情来看看. 1.使 ...
- ES6 新增的一些特性
还有symbol和set,map, bind,call,apply 1. let关键字 (1)基本用法:let关键字用来声明变量,它的用法类似于var,都是用来声明变量. (2)块级作用域:let声明 ...
- [Pytorch框架] 5.3 Fashion MNIST进行分类
文章目录 5.3 Fashion MNIST进行分类 Fashion MNIST 介绍 数据集介绍 分类 格式 数据提交 数据加载 创建网络 损失函数 优化器 开始训练 训练后操作 可视化损失函数 保 ...
- Extjs4 Tree Grid 综合示例(展开、编辑列、获取数据)
用json数据模拟后端传回来的结果,Extjs tree支持两种类型的结构,一种是带children属性的嵌套式的数据,一种是扁平的,每条记录带pid的数据,带pid的添加配置项可以自动解析成树形结构 ...
- 【STL】C++使用STL处理替换字符串操作。
// Examples4STL.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include <stdio.h> #incl ...
- 2022-10-04:以下go语言代码输出什么?A:{123} main.T{x:123} B:{123} T{x:123} C:boo boo D:boo main.T{x:123}。 packag
2022-10-04:以下go语言代码输出什么?A:{123} main.T{x:123} B:{123} T{x:123} C:boo boo D:boo main.T{x:123}. packag ...