原本代码 <el-table-column label="附件" width="120"> <template #default="scope"> <el-image v-if="scope.row.attachmentUrl" :src="scope.row.attachmentUrl" :preview-src-list="[scope.row.attachmentUrl]" style="width: 40px;height: 40px;border-radius: 5px"> </el-image> </template> </el-table-column>
出现了各种bug
解决方案 : 添加 preview-teleported 属性即可
<el-table-column label="附件" width="120"> <template #default="scope"> <el-image v-if="scope.row.attachmentUrl" :src="scope.row.attachmentUrl" :preview-src-list="[scope.row.attachmentUrl]" style="width: 40px;height: 40px;border-radius: 5px" preview-teleported> </el-image> </template> </el-table-column>
标签:el,预览,image,teleported,bug,图片 From: https://www.cnblogs.com/youxiandechilun/p/18509551