<!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>
</head>
<body>
<div id="app">
<h3 v-for="(n,index) in 3">{{n}} - {{index}}</h3>
<h4 v-for="(user,index) in userList">name:{{user.name}} - age:{{user.age}}</h4>
</div>
<script src="vue.min.js"></script>
<script>
new Vue({
el:'#app',
data: {
userList: [
{name:'hh',age:11},
{name:'er',age:22},
{name:'rr',age:88}
]
},
methods: {
}
})
</script>
</body>
</html>
15.vue中的循环指令
猜你喜欢
转载自blog.csdn.net/gunsmoke/article/details/105277112
今日推荐
周排行