forked from wwmin/JavaScript30
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
30 lines (30 loc) · 676 Bytes
/
index.html
File metadata and controls
30 lines (30 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
<title>饿了么</title>
<script src="./vue.js"></script>
</head>
<body>
<div id="app">
<input type="text" @input="inputMethod" v-model="input">
{{value}}
</div>
</body>
<script>
var app=new Vue({
el:"#app",
data:{
input:'',
value:''
},
methods:{
inputMethod:function(){
console.log(this.input);
this.value=this.input;
}
}
})
</script>
</html>