element-ui如何在表格中插入图片
element
A Vue.js 2.0 UI Toolkit for Web
项目地址:https://gitcode.com/gh_mirrors/eleme/element
免费下载资源
·
第一种:
<el-table-column label="精品图片">
<template slot-scope="scope">
<el-popover placement="top-start" title="" trigger="hover">
<img :src="scope.row.product.cover" alt="" style="width: 150px;height: 150px">
<img slot="reference" :src="scope.row.product.cover" style="width: 30px;height: 30px">
</el-popover>
</template>
</el-table-column>
效果图:
第二种:
<el-table-column label="精品图片">
<template slot-scope="scope">
<el-image style="width: 30px; height: 30px" :src="scope.row.product.cover" :preview-src-list="[scope.row.product.cover]">
<div slot="error" class="image-slot">
<i class="el-icon-picture-outline"></i>
</div>
</el-image>
</template>
</el-table-column>
效果:
如何插入多张:
<el-table-column label="面料图片">
<template slot-scope="scope">
<el-image v-for="(item, index) in scope.row.image_info" :key='index' style="width: 30px; height: 30px" :src="item.image" :preview-src-list="[item.image]"></el-image>
</template>
</el-table-column>
效果:
GitHub 加速计划 / eleme / element
54.06 K
14.63 K
下载
A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:3 个月前 )
c345bb45
7 个月前
a07f3a59
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update table.md
* Update transition.md
* Update popover.md 7 个月前
更多推荐
已为社区贡献4条内容
所有评论(0)