-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.html
61 lines (60 loc) · 1.58 KB
/
data.html
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="app">
<input type="text" v-model="info">
<p>我的学号为{{info}}</p>
<p>我的电话为{{tel}}</p>
<p>我在{{arr[1]}}班</p>
<p>我的年龄是{{stu.age}}</p>
<p>{{time}}</p>
</div>
<script src="./js/vue.js"></script>
<script>
let vm=new Vue({
el:"#app",
data:{
info:'201806370541',
tel:110,
arr:[1,2,3,4,5],
stu:{
name:'Junfeng Yan',
job:'student',
age:21
},
time: new Date()
//显示当前时间
},
beforeCreate() {
console.log('beforeCreate')
},
created() {
console.log('created')
},
beforeMount() {
console.log('beforeMount')
},
mounted() {
console.log('mounted')
},
beforeUpdate() {
console.log('beforeUpdate')
},
updated() {
console.log('updated')
},
beforeDestroy() {
console.log('beforeDestroy')
},
destroyed() {
console.log('destroyed')
}
})
</script>
</body>
</html>