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

原文地址:https://www.cnblogs.com/wenqihe/p/13280380.html