s2e20 keyup and enter

This commit is contained in:
Tyrel Souza 2018-04-13 13:55:37 -04:00
parent 0de151a58b
commit 36264891e2
No known key found for this signature in database
GPG Key ID: 5A9394D4C30AEAC0
2 changed files with 3 additions and 2 deletions

4
app.js
View File

@ -13,8 +13,8 @@ var app = new Vue({
this.x = event.clientX; this.x = event.clientX;
this.y = event.clientY; this.y = event.clientY;
}, },
dummy(event){ alertMe(event){
event.stopPropagation(); alert(event.target.value);
} }
} }
}) })

View File

@ -12,6 +12,7 @@
<p v-on:mousemove="updateCoordinates">Coordinates {{x}}, {{y}} <p v-on:mousemove="updateCoordinates">Coordinates {{x}}, {{y}}
<span v-on:mousemove.stop.prevent=""> DEAD SPOT</span> <span v-on:mousemove.stop.prevent=""> DEAD SPOT</span>
</p> </p>
<input type="text" v-on:keyup.enter='alertMe'>
</div> </div>
<script src="app.js" charset="utf-8"></script> <script src="app.js" charset="utf-8"></script>