-
0 votesanswersviews
以索引为键的Vue for循环会导致不可预测的行为
我有一个数组,使用 v-for 呈现为一组Vue组件 . 我需要使用 :key="" ,否则Vue会抱怨 . 我的数组没有唯一标识符,所以我使用索引作为键 我的循环 <card v-for="(item, index) in questions" :question="item" :key="index">... -
2 votesanswersviews
循环在Vue.JS中迭代一些项目并将它们包装在一个元素中
我是Vue的新手,我想创建一个Loop(v-for)来创建像这个块一样的东西 <div class="The-row"> <span> {{ * }} </span> <span> {{ * }} </span> </div> 在这个块中,每个2 span包含一个带有“The-row”类的Tag,每个...