源码在哪里?
本章源码在哪里?
本章源码在哪里?
2018-05-12
<!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>
<script type="text/javascript" src="{{url_for('static', filename='vue/vue.min.js')}}"></script>
</head>
<body>
<div id="root">
<input v-model="inputValue"/>
<button @click="handelClick">提交</button>
<ul>
<li v-for="(item,index) of list" :key="index">{{item}}</li>
</ul>
</div>
<script>
new Vue({
el:"#root",
data:{
inputValue:"",
list:[],
},
methods:{
handelClick:function() {
this.list.push(this.inputValue)
}
}
})
</script>
</body>
</html>
举报