在列表中动态设置元素的id
<div class="col-6" v-for="(item,i) in showpics" :key="i">
<img
class="showpic"
src="../assets/dllogo.png"
:id="getId('showpic',i)"
/>
</div>
......
getId(idcommon, i) {
return idcommon + i;
}