-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
39 lines (36 loc) · 1 KB
/
Copy pathapp.js
File metadata and controls
39 lines (36 loc) · 1 KB
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
const app = Vue.createApp({
data(){
return{
gunName: 'G-36',
gunBrand: 'Hecklor & Koch',
stock:'56',
hide: true,
x: 0,
y: 0,
guns: [
{name: 'AR-15', brand: 'ArmaLite', url: 'https://www.youtube.com/watch?v=BSizVpfqFtw', img: 'assets/ar-15.png', isFav: true},
{name: 'HK-416', brand: 'Hecklor & Koch', url: 'https://www.youtube.com/watch?v=pbImvaiXGFU', img: 'assets/hk-416.png', isFav: false},
{name: 'Scar-L', brand: 'FNH USA', url: 'https://www.youtube.com/watch?v=DAUIi05Rckc', img: 'assets/scar-l.png', isFav: true}
]
}
},
methods: {
changeTitle(title){
this.title = title
},
toggleShowGuns(){
this.hide = !this.hide
},
handleEvent(e){
console.log(e)
},
handleMouseMove(e){
this.x = e.offsetX,
this.y = e.offsetY
},
changeFav(gun){
gun.isFav = !gun.isFav
}
}
})
app.mount('#app')