vue报错:[Vue warn]: Duplicate keys detected: ‘[object Object]‘. This may cause an update error.
[Vue warn]: Avoid using non-primitive value as key, use string/number value instead.原因:检测到重复的键:“[object]”。<div v-for='item in items' :key='item'>解决:修改key值<div v-for='item in items' :key='item
·
[Vue warn]: Avoid using non-primitive value as key, use string/number value instead.
原因:检测到重复的键:“[object]”。
<div v-for='item in items' :key='item'>
解决:修改key值
<div v-for='item in items' :key='item.index'>
或:
<div v-for='(item,index)in items' :key='index'>
更多推荐
已为社区贡献3条内容
所有评论(0)