The preview image is used when using el-image
Clicking on the picture to preview the display is incorrect, for example, clicking on the second one displays the first one. To solve this problem, you can use the following to solve it
That is, the problem of subscripting
When using this, we generally use it with v-for
<el-image
preview-teleported
v-for="(item,index) in table.code_img"
:key="item"
style="width: 70px; height: 70px; margin: 0 10px 0 0"
:src="domain + item"
:zoom-rate="1.2"
:preview-src-list="code_imgs"
:initial-index="index"
fit="cover"
/>
Set the value of this property to the index of the v-for loop