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.y = event.clientY;
},
dummy(event){
event.stopPropagation();
alertMe(event){
alert(event.target.value);
}
}
})

View File

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