当前位置: 代码迷 >> 综合 >> [vue/require-v-for-key] Elements in iteration expect to have ‘v-bind:key‘ directives.
  详细解决方案

[vue/require-v-for-key] Elements in iteration expect to have ‘v-bind:key‘ directives.

热度:86   发布时间:2023-11-21 23:14:21.0
<li v-for="item in list">

这段代码在Visual Studio Code中会被标红,解决办法如下

<li v-for="item in list" :key="item">

关注公众号"阿里亲学长",更快获取前端知识

  相关解决方案