s2e18 event

This commit is contained in:
Tyrel Souza 2018-04-13 13:49:13 -04:00
parent b462dbc8ad
commit 04732ca839
No known key found for this signature in database
GPG Key ID: 5A9394D4C30AEAC0
2 changed files with 3 additions and 3 deletions

4
app.js
View File

@ -6,8 +6,8 @@ var app = new Vue({
y: 0,
},
methods:{
click(){
this.counter++;
increase(step, event){
this.counter+= step;
},
updateCoordinates(event){
this.x = event.clientX;

View File

@ -7,7 +7,7 @@
</head>
<body>
<div id='app'>
<button @click="click">Click Me</button>
<button @click="increase(2, $event)">Click Me</button>
<p>{{ counter }}</p>
<p v-on:mousemove="updateCoordinates">Coordinates {{x}} {{y}} </p>
</div>