commit | author | age
|
38b8f3
|
1 |
const app = Vue.createApp({ |
CM |
2 |
data() { |
|
3 |
return { |
778328
|
4 |
counter: 10, |
CM |
5 |
name: '', |
|
6 |
confirmedName: '', |
38b8f3
|
7 |
}; |
CM |
8 |
}, |
|
9 |
methods: { |
778328
|
10 |
confirmInput(){ |
CM |
11 |
this.confirmedName = this.name; |
|
12 |
}, |
|
13 |
submitForm(event){ |
|
14 |
alert("Subit form"); |
|
15 |
}, |
38b8f3
|
16 |
setName(event){ |
778328
|
17 |
this.name= event.target.value ; |
38b8f3
|
18 |
}, |
CM |
19 |
add(num) { |
|
20 |
this.counter = this.counter + num; |
|
21 |
}, |
|
22 |
sub(num) { |
|
23 |
this.counter = this.counter - num; |
|
24 |
}, |
|
25 |
}, |
|
26 |
}); |
|
27 |
|
|
28 |
app.mount("#events"); |