数据格式:
{
"success": true,
"msg": "ok",
"data": {
"count": 3429,
"totalPages": 343,
"data": [{
name:'张三',
sex:'男',
"wxinfo": [
{
"nickname": "微信名字",
"headimgurl": "http://xxx1.com
},
{
"nickname": "微信名字",
"headimgurl": "http://xxx2.com
}
],
},
{
//...
}]
}
}
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>
多个文字,用引号加分号隔开
<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>
本文深入探讨了复杂的JSON数据结构解析方法,并详细介绍了如何在Vue项目中使用table组件展示包含多层级数据的情况,特别是针对每个条目下有多张图片和多个文字字段的场景。
402

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



