vue+elementui进阶之路-el-table中显示图片
转载声明:
本文为摘录自“博客园”,版权归原作者所有。
温馨提示:
为了更好的体验,请点击原文链接进行浏览
摘录时间:
2020-10-18 15:14:23
1、table中显示图片
2、当需要遍历图片时,不能直接使用prop绑定值
3、一张图片
<el-table-column label="头像"> <template slot-scope="scope"> <img :src="scope.row.img" width="40" height="40" class="head_pic"/> </template> </el-table-column>
4、多张图片
<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>