滦南三中,景德镇在线,起凡武林外传郭巨侠
如下所示:
specifications:[ { specificationname:"颜色", specificationitem:[ {value:"黄色"}, {value:"黑色"} ] } ]
<table class="table table-bordered table-hover table-item spggdytable" id="ggxtable" v-show="isaddspecifications"> <thead> <tr> <th>排序</th> <th>规格项</th> <th>操作</th> </tr> </thead> <tbody> <tr v-for="(item,index) in specifications"> <td>{{index}}</td> <td>{{item.specificationname}}</td> <td> <a href='#'> <img src='../img/common_edit@25.png' alt='修改'></a> <a href='#'><img src='../img/common_del@25.png' alt='删除'></a> </td> </tr> </tbody> </table> <table class="table table-bordered table-hover table-item spggdytable" id="ggztable" v-show="isaddspecifications"> <thead> <tr> <th>规格值</th> <th>操作</th> </tr> </thead> <tbody v-for="(item,index) in specifications"> <tr v-for="(part,n) in item.specificationitem"> <td>{{part.value}}</td> <td> <a href='#'> <img src='../img/common_edit@25.png' alt='修改'></a> <a href='#'><img src='../img/common_del@25.png' alt='删除'></a> </td> </tr> </tbody> </table>
以上这篇vue利用v-for嵌套输出多层对象,分别输出到个表的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持移动技术网。
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
VUE+elementui组件在table-cell单元格中绘制微型echarts图
Vue通过getAction的finally来最大程度避免影响主数据呈现问题
vue 路由懒加载中给 Webpack Chunks 命名的方法
网友评论