(vue)el-table中展示图片且可放大
放大效果:
代码:
<el-table-column prop="specificLogic" label="具体逻辑" align="center">
<template slot-scope="scope">
<el-image
style="width: 100px; height: 40px"
:src="scope.row.specificLogic"
:preview-src-list="[scope.row.specificLogic]"
></el-image>
</template>
</el-table-column>
拓展:多图片展示
代码:
<el-table-column prop="images" label="配图" align="center" width="150">
<template slot-scope="scope">
<el-image v-for="(item, index) in scope.row.images" :key="index":src="item"
:preview-src-list="[item]" >
</el-image>
</template>
</el-table-column>
解决参考:https://blog.csdn.net/weixin_48373171/article/details/129880542