使用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>
效果如下: