v-for获取多层数据?

如图,数据有多个List,list中的Truchorders里面也有多个数据, 如何将数据渲染到列表中
现有的写法无法取值

                <li v-for="(items,index) in List">
                    <span class="wb30">{{items.truckorders.policyholder}}</span>
                    <span class="wb30">{{items.truckorders.plate_no}}</span>
                    <span class="wb30">{{items.truckorders.end_city}}</span>
                    <a class="wb10" href="javascript:;">确定</a>
                </li>
var vm = new Vue({
        el:'.search_ins_box',
        data:{
            List:[
                {
                    "err_code":0,
                    "err_msg":"",
                    "truckorders":[
                        {
                            "policyholder":"武汉测试公司",
                            "beneficiary":"武汉测试公司",
                            "plate_no":"鄂A2222",
                            "coverage":1500000,
                            "start_province":"湖北省",
                            "start_city":"咸宁市",
                            "end_province":"湖北省",
                            "end_city":"襄阳市",
                            "create_date":"2016-01-05T11:31:37+08:00",
                            "cargos":[
                                {
                                    "id":"be1f3e16-b35b-11e5-8445-6c400892aa6e",
                                    "tracking_no":"1234",
                                    "name":"椅子",
                                    "beginning":"咸宁市",
                                    "destination":"襄阳市",
                                    "quantity":"22.00",
                                    "unit":"把"
                                }
                            ]
                        }
                    ]
                },
                {
                    "err_code":0,
                    "err_msg":"",
                    "truckorders":[
                        {
                            "policyholder":"武汉测试公司",
                            "beneficiary":"武汉测试公司",
                            "plate_no":"鄂A2222",
                            "coverage":1500000,
                            "start_province":"湖北省",
                            "start_city":"咸宁市",
                            "end_province":"湖北省",
                            "end_city":"襄阳市",
                            "create_date":"2016-01-05T11:31:37+08:00",
                            "cargos":[
                                {
                                    "id":"be1f3e16-b35b-11e5-8445-6c400892aa6e",
                                    "tracking_no":"1234",
                                    "name":"椅子",
                                    "beginning":"咸宁市",
                                    "destination":"襄阳市",
                                    "quantity":"22.00",
                                    "unit":"把"
                                }
                            ],
                        }
                    ]
                }
            ]
        }
    })

clipboard.png

clipboard.png

阅读 2.7k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题