<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>
<div id="app">
<ol>
<todo-item v-for='item in list' v-bind:todo="item" v-bind:key="item.id"></todo-item>
</ol>
</div>
<script>
Vue.component('todo-item',{
props:['todo'],
template:'<li>{{todo.text}}</li>'
})
var app7 = new Vue({
el:'#app',
data:{
list:[
{id:0,text:'蔬菜'},
{id:1,text:'奶露'},
{id:0,text:'aaaa'}
]
}
})
</script>
</body>
</html>