<div class="xx" v-for="(item, index) in upload_img">
<input type="checkbox" name="upload_img" id ="xx" :id="['xxx'+index]" v-model="checkList_img" :value="item" />
<label :for="index">{{item}}</label>
</div>
<div class="xx" v-for="(item, index) in upload_img">
<input type="checkbox" name="upload_img" id ="xx" :id="['xxx'+index]" v-model="checkList_img" :value="item" />
<label :for="index">{{item}}</label>
</div>
本文标题:for 循环 给标签加动态属性
本文链接:https://www.haomeiwen.com/subject/twpoqxtx.html
网友评论