Vue V-for 循环 二
2018-09-11 本文已影响0人
北觅_Sir
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src=""https://cdn.bootcss.com/vue/2.5.16/vue.min.js">
</script>
</head>
<body>
<div id="box">
<ul>
<li v-for="v in arr">
{{v.name}}
{{v.old}}
</li>
</ul>
</div>
<script>
new Vue({
el:'#box',
data:{
arr:[{name:'1',old:18},{name:'2',old:19},{name:'3',old:20}]
}
})
</script>
</body>
</html>