-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.js
55 lines (47 loc) · 1.04 KB
/
test.js
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
window.addEventListener("load", () => {
// 1. 텍스트 바인딩
new Vue({
el: '#app1',
data: {
message: 'Hello Vue.js!'
}
});
// 2. 반복 렌더링
new Vue({
el: '#app2',
data: {
list: ['사과', '바나나', '딸기']
}
});
// 3. 이벤트 사용하기
new Vue({
el: '#app3',
methods: {
handleClick: function (event) {
alert(event.target) // [object HTMLButtonElement]
}
}
});
// 4. 입력 양식과 동기화하기
new Vue({
el: '#app4',
data: {
message: '초기 메시지'
}
});
// 5. 조건 분기
new Vue({
el: '#app5',
data: {
show: true
}
});
// 6. 트랜지션과 애니메이션
var app = new Vue({
el: '#app6',
data: {
show: true
}
});
}); ////////////// load ///////////////////////
///////////////////////////////////////////////