diff --git a/app.js b/app.js index e9671d8..18fdbdc 100644 --- a/app.js +++ b/app.js @@ -1,11 +1,17 @@ var app = new Vue({ el: '#app', data: { - counter: 0 + counter: 0, + x: 0, + y: 0, }, methods:{ click(){ this.counter++; + }, + updateCoordinates(event){ + this.x = event.clientX; + this.y = event.clientY; } } }) diff --git a/index.html b/index.html index 4cf4f04..98d313f 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,7 @@

{{ counter }}

+

Coordinates {{x}} {{y}}