<!DOCUMENT html>
<html lang="en">
<head>
<meta charest="UTF-8">
<title>Document</title>
</head>
<body>
<div class="ids">
<ul>
<li v-for="v in arr">{{v}}</li>
<li v-for=''vi in obj">{{vi}}</li>
</ul>
<.ul>
<li v-for="(val,ind) in arr">
{{ind}}-----{{val}}
</li>
<li v-for="(val,ind) in obj">
{{ind}}>{{val}}
<li>
<li v- for="value in ars">
{{value.num}}
{{value.name}}
{{value.price}}
</li>
</ul>
<from action="#">
<table border="1">
<thead>
<tr>
<th>编号</th>
<th>名称</th>
<th>单价</th>
</tr>
</thead>
<tbody>
<tr v-for="(value,index) in ars">
<td>{{index+1}}</td>
<td>{{value.name}}</td>
<td>{{value.price}}</td>
</tr>
</tbody>
</table>
</from>
</div>
new Vue({
el: '.ids'
, data: {
arr: [123, 123, 123, 123, 976926]
, obj: {
name: '小明'
, age: 15
}
, ars: [{
num: 1
, name: "apple"
, price: 3
}
, {
num: 1
, name: "banner"
, price: 1
}
, {
num: 1
, name: "orang"
, price: 2
}
]
}
})
</script>
</body>
</html>