为页面输入框进行数据绑定:
1.input
2.select
3.textarea
4.components
<!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">
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<title>Document</title>
</head>
<body>
<div id="myApp">
<p>你最喜欢的游戏是:{{mygame}}</p>
<input type="text" v-model = "mygame">
</div>
<script>
var myApp = new Vue({
el:'#myApp',
data:{
mygame:'英雄联盟'
},
});
</script>
</body>
</html>