vue笔记----指令for

来源:互联网 发布:财经日历软件 编辑:程序博客网 时间:2024/06/05 10:34

html:

<div id="app>

<ol>

<li v-for="todo in todos.">{{todo.text}}<li>

</ol>

</div>

js:

var app=new Vue({

el:'#app',

data:{

todos:[

{text:'learn javascript'},

{text:'learn Vue'},

{text:'learn nodejs'}

]

}

})

0 0
原创粉丝点击