<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
</head>
<body>
<div id="app">
<ul>
<li v-for="todo in todos">
{{todo.text}}
</li>
</ul>
</div>
<script src="http://static.runoob.com/assets/vue/1.0.11/vue.min.js"></script>
<script>
var vm = new Vue({
el:‘#app‘,
data:{
todos:[
{text:‘Learn JavaScript‘},
{text:‘Learn Vue.js‘},
{text:‘Learn Css‘}
]
}
});
</script>
</body>
</html>
时间: 2024-11-05 12:14:30