<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="./lib/vue.js"></script>
</head>
<body>
<div id="app">
<p v-for="(user, index) in UserObj" :key="index">{{index}} {{user.name}} {{user.age}}</p>
</div>
<script>
var vm=new Vue({
el:'#app',
data:{
UserObj:[
{"name":"zhangsan","age":18 },
{"name":"zhangsan1","age":19},
{"name":"zhangsan2","age":20},
{"name": "zhangsan3", "age": 21}
]
},
methods:{}
});
</script>
</body>
</html>