<template>
<view>
这个就是开始循环的段落
<view v-for="(item, index) in students">
<view class="persons">{{index}} - {{item.name}}</view>
</view>
</view>
</template>
<script>
export default {
data: {
students : [
{name : "张三", age : 18},
{name : "李四", age : 20}
]
},
onLoad:function(options){
console.log("onLoad");
},
onHide:function(){
console.log("onHide");
},
onShow:function(){
console.log("onShow");
}
}
</script>
<style>
.persons{width:750px; line-height:2.2em;}
</style>