Vue | using non-primitive value as key, use string/number value instead.
2018-10-08 22:43
1326 查看
[code]<div v-for="item in items" :key="item">
我这里的items是一个对象,item也是一个对象,
这个报错意思就是,key中的变量必须是字符串或者是数字类型,
解决办法,在item后随便添加个属性
比如:
[code]<div v-for="item in items" :key="item.string">
阅读更多
相关文章推荐
- 关于iview中[Vue warn]: Avoid using non-primitive value as key, use string/number value instead.影响性能的问题
- 解决element-ui upload组件报错 Avoid using non-primitive value as key, use string/number value instead
- vue报错:ues string/number value instead
- Spring整合Ehcache3启动报错”Cache [xxx] specifies key/value types. Use getCache(String, Class, Class)”
- Use StringBuilder instead of String as possible as you can.
- [常见错误 及 解决方案系列]USE " cc.exports.* = value " INSTEAD OF SET GLOBAL VARIABLE"
- WARN conf.Configuration: mapred.output.value.class is deprecated. Instead, use mapreduce.job.output.
- [常见错误 及 解决方案系列]USE " cc.exports.* = value " INSTEAD OF SET GLOBAL VARIABLE"
- php下关于Cannot use a scalar value as an array的解决办法
- Hashtable and HashMap are two hash based collection in Java and used to store objects as key value p
- [Vue warn]: Do not use built-in or reserved HTML elements as component id:
- expected number,sequence,or string.map evaluated instead of freemarker.template.smplehash
- Missing space before value for key 'path'vue.js解决空格报错
- The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaini
- Use Exception.ToString() instead of Exception.Message.
- Use of uninitialized value in concatenation (.) or string at test.pl line 232
- storm杂谈之Why use netty as transport instead of zeromq
- 问题:Incorrect string value: '\xE5\xAE\x89\xE5\x8D\x93...' for column 'use_device' at row 1
- php下关于Cannot use a scalar value as an array的解决办法
- swift - use backslash to add the value in the string