s2e19 stop and propagate

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

3
app.js
View File

@ -12,6 +12,9 @@ var app = new Vue({
updateCoordinates(event){ updateCoordinates(event){
this.x = event.clientX; this.x = event.clientX;
this.y = event.clientY; this.y = event.clientY;
},
dummy(event){
event.stopPropagation();
} }
} }
}) })

View File

@ -9,7 +9,9 @@
<div id='app'> <div id='app'>
<button @click="increase(2, $event)">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}}
<span v-on:mousemove.stop.prevent=""> DEAD SPOT</span>
</p>
</div> </div>
<script src="app.js" charset="utf-8"></script> <script src="app.js" charset="utf-8"></script>