使用Element实现在table表中显示图片:
1、一张图片
<el-table-column label="头像">
<template slot-scope="scope">
<img :src="scope.row.img" width="40" height="40" class="head_pic"/>
</template>
</el-table-column>
效果如下:

2、多张图片
<el-table-column prop="pictures" label="描述图片">
<template scope="scope">
<img v-for="item in scope.row.pictures" :src="item" width="40" height="40" class="head_pic"/>
</template>
</el-table-column>
效果如下:

本文详细介绍了如何使用Element UI在table表中显示图片,包括单张图片和多张图片的展示方法,通过简单的代码示例展示了具体的实现过程。
4614

被折叠的 条评论
为什么被折叠?



