-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
0.html
133 lines (102 loc) · 2.49 KB
/
0.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="vue.js"></script>
</head>
<body>
<div id="app">
<!--this is comment--> {{ message }}
</div>
<div id="app1">
<div >
<!--count={{count}}-->
<!--reversedCount={{reversedCount}}-->
</div>
</div>
<script>
console.log( Object.keys('abcd'))
debugger;
console.log('=====return 1=======')
console.log( new Function('return 1'))
console.log('return='+ new Function(("return " + function () {
})));
var app = new Vue({
el: '#app',
beforeCreate(){
},
created(){
},
beforeMount(){
},
mounted: ()=> { //挂载元素,获取到DOM节点
setTimeout(()=>{
// this.count+=1;
// console.log('this.count='+this.count)
},1000)
},
beforeUpdate(){
},
updated(){ //挂载元素,获取到DOM节点
},
beforeDestroy(){
},
destroyed(){
},
data:function () {
return {
count:0,
message: 'Hello Vue!1111111'
}
},
// data: {
// count:0,
// message: 'Hello Vue!'
// }
})
var app1 = new Vue({
comments:true,
el: '#app1',
beforeCreate(){
},
created(){
},
beforeMount(){
},
methods:{
click:function () {
console.log('点击事件')
}
},
mounted: function (){ //挂载元素,获取到DOM节点
setTimeout(()=>{
console.log(this.count)
this.count++;
console.log('this.count=')
console.log(this.count)
},1000)
},
computed: {
// 计算属性的 getter
reversedCount: function () {
// `this` 指向 vm 实例
return this.count++;
}
},
beforeUpdate(){
},
updated(){ //挂载元素,获取到DOM节点
},
beforeDestroy(){
},
destroyed(){
},
data: {
count:0,
message: 'Hello Vue!2222'
}
})
</script>
</body>
</html>