-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue-main.js
49 lines (46 loc) · 1.16 KB
/
vue-main.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
Vue.component('counter', {
props: ['member'],
template: '#counter-template',
})
Vue.component('card-member', {
props: ['member'],
template: '#card-member-template',
})
Vue.component('modal-member', {
props: ['id'],
template: '#modal-member-template',
})
let app = new Vue({
el: '#app',
data: {
members: [{
id: 1,
name: 'Alpha',
image: 'img/alpha.png',
description: 'Pemimpin Bijaksana',
count: 0
},
{
id: 2,
name: 'Beta',
image: 'img/beta.png',
description: 'Pemimpin Ramah',
count: 0
},
{
id: 3,
name: 'Cherry',
image: 'img/cherry.png',
description: 'Pemimpin Jujur',
count: 0
},
{
id: 4,
name: 'Enigma',
image: 'img/enigma.png',
description: 'Pemimpin Merakyat',
count: 0
}
]
}
})