vue里多维数组的索引值怎么获得 财富值86

2016-10-27 11:09发布

[

            {                 "_id": "578c2f687ec482840b07e4e8",                 "nodes": [                     "XYK0101000002G",                     "XYK0101000007G"                 ],                 "users": [                     {                         "_id": "578c2f2c7ec482840b07e4e7",                         "name": "18951904112",                         "group_id": "578c2f687ec482840b07e4e8",                         "latest_get_message_time": 1477385019,                         "role": "master",                         "info": {                             "phone": "1895112",                             "name": "",                             "address": "江苏",                             "mou_num": 0,                             "pond_num": 0,                             "per_mou_fish": 0,                             "kinds": [                                 "混养"                             ]                         }                     },                     {                         "_id": "57e3531f79dc5d5417b55825",                         "name": "17895001036",                         "group_id": "578c2f687ec482840b07e4e8",                         "role": "helper",                         "info": {                             "phone": "1904112",                             "name": "李",                             "address": "江苏省园区",                             "mou_num": 0,                             "pond_num": 0,                             "per_mou_fish": 0,                             "kinds": [                                 "混养"                             ]                         }                     }                 ]             },             {                 "_id": "578c2f687ec482840b07e4e8",                 "nodes": [                     "XYK0101000002G",                     "XYK0101000007G"                 ],                 "users": [                     {                         "_id": "578c2f2c7ec482840b07e4e7",                         "name": "18951112",                         "group_id": "578c2f687ec482840b07e4e8",                         "latest_get_message_time": 1477385019,                         "role": "master",                         "info": {                             "phone": "18951904112",                             "name": "",                             "address": "",                             "mou_num": 0,                             "pond_num": 0,                             "per_mou_fish": 0,                             "kinds": [                                 "混养"                             ]                         }                     }                 ]             }         ];                  这是数据                  

一个users是一个数据,我想按users的记录数作为序号,怎么实现

6条回答

但是这个地方题主是不是想根据users的数量进行编号,不知道我理解的对不对,这样子我的建议是在最外层init一个变量,最里层的v-for每次++。

一周热门 更多>