循环渲染
循环渲染使用的是v-for
<body> <div id="app"> <div v-for="item in arr">{{item}}</div> <div v-for="item in arr2">{{item.time}}</div> <div v-for="item in arr2">{{item.thing}}</div> </div> </body> <script> new Vue({ el:"#app", data:{ arr:["打起精神!","打起精神来!!","胜利就在前方!!"], arr2:[{ time:"08:50", thing:"上课了!" },{ time:"9:50", thing:"下课了!!" },{ time:"10:10", thing:"又上课了!!!" },{ time:"11:50", thing:"干饭!!!!" } ] }, }) </script>
标签:Vue,渲染,50,thing,循环,item,time From: https://www.cnblogs.com/forever-ljf/p/16641497.html