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, y: 0,
}, },
methods:{ methods:{
click(){ increase(step, event){
this.counter++; this.counter+= step;
}, },
updateCoordinates(event){ updateCoordinates(event){
this.x = event.clientX; this.x = event.clientX;

View File

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