vue采坑------v-for

记录一下自己踩过的坑 这是写vue第4天

sceneData: [ {"id": 1,title:"场景1", "gif_info":{"file":""}, "scene":[{"aeid":"1-1","content":"your text 1","source":""},{"aeid":"1-2","source":""},{"aeid":"1-3","source":""}], }, { "id": 2, title: "场景2", "gif_info": {"file": ""}, "scene": [{"aeid": "2-1", "content": "your text 2", "source": ""}], }, { "id": 3, title: "场景3", "gif_info": {"file": ""}, "scene": [{"aeid": "3-1", "content": "your text 3", "source": ""}], }, { "id": 4, title: "场景4", "gif_info": {"file": ""}, "scene": [{"aeid": "4-1", "content": "your text 4", "source": ""}], }, { "id": 5, title: "场景5", "gif_info": {"file": ""}, "scene": [{"aeid": "5-1", "content": "your text 5", "source": ""}], }, { "id": 6, title: "场景6", "gif_info": {"file": ""}, "scene": [{"aeid": "6-1", "content": "your text 6", "source": ""}], }, { "id": 7, title: "场景7", "gif_info": {"file": ""}, "scene": [{"aeid": "7-1", "content": "your text 7", "source": ""}], } ],

这样一个数据 取值

需要两个v-for套起来用 然后捣鼓了半天

不要纠结于index 因为纠结于index所以一直不得其解 就这样。

猜你喜欢

转载自www.cnblogs.com/nannan-0305/p/11057397.html