element UI表格單元格展示多張圖片


https://blog.csdn.net/gjsiaifa/article/details/90903370

 

數據格式:

{
"success": true,
"msg": "ok",
"data": {
"count": 3429,
"totalPages": 343,
"data": [{
name:'張三',
sex:'男',
"wxinfo": [
{
"nickname": "微信名字",
"headimgurl": "http://xxx1.com
},
{
"nickname": "微信名字",
"headimgurl": "http://xxx2.com
}
],
},
{
//...
}]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
table組件中,多個圖片

<el-table-column prop="wxinfo" label="微信頭像" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<img :src="item.headimgurl" v-for="(item,index) in scope.row.wxinfo" height="90%" class="touxiang"/>
</template>
</el-table-column>
1
2
3
4
5
多個文字,用引號加分號隔開

<el-table-column prop="wxinfo" label="微信昵稱" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-for="(item,index) in scope.row.wxinfo">"{{item.nickname}}",</span>
</template>
</el-table-column>
————————————————
版權聲明:本文為CSDN博主「yc99」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/gjsiaifa/article/details/90903370


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM