Fork me on github

vue使用v-for时vscode报错 Elements in iteration expect to have 'v-bind:key' directives

在v-for 后添加 :key='item'
li v-for="i in list" :key="i"
div class="item" v-for="(user,index) in datalist" :key='index'
参考文章:https://www.cnblogs.com/zdz8207/p/vue-for-v-bind-key.html

posted on 2020-07-10 17:28  markyle  阅读(185)  评论(0编辑  收藏  举报