<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>v-on:mouseover</title>
<script src="https://cdn.bootcss.com/vue/2.6.11/vue.js"></script>
</head>
<body>
<div id="app">
<ul>
<li v-for="(item,index) in c">{{item}}={{index}}</li>
</ul>
<ul>
<li v-for="(key,value) in product">{{key}}={{value}}</li>
</ul>
<table border="1">
<tr>
<td>序号</td>
<td>编号</td>
<td>名称</td>
<td>价格</td>
</tr>
<tr v-for="(product,index) in products">
<td>{{index+1}}</td>
<td>{{product.id}}</td>
<td>{{product.name}}</td>
<td>{{product.price}}</td>
</tr>
</table>
</div>
</body>
<script type="application/javascript">
new Vue({
el:"#app",
data:{
c:[1,2,3,4,5],
product:{
id:1,
name:"笔记本电脑",
price:5000
},
products:[
{id:1,name:"笔记本电脑",price:5000},
{id:2,name:"手机",price:3000},
{id:3,name:"mp3",price:300}
]
},
methods:{
}
})
</script>
</html>
效果图: