JSFiddle - React, Tailwind, and code Playground
by budyniowski
HTML
<script src="https://unpkg.com/vue"></script>
<div id="app">
<button @click="incraseCounter">Click Me</button>
<p>{{counter}}</p>
<p @mousemove="updateCoordinates">
Coordinates: {{x}} x {{y}} -
<span @mousemove.stop>DEAD SPOT</span></p>
</div>
JavaScript
new Vue({
el: '#app',
data:{
counter: 0,
x: 0,
y: 0
},
methods:{
incraseCounter: function(){
this.counter++;
},
updateCoordinates: function(event){
this.x = event.x;
this.y = event.y;
}
}
})