s2e18 event
This commit is contained in:
parent
b462dbc8ad
commit
04732ca839
4
app.js
4
app.js
@ -6,8 +6,8 @@ var app = new Vue({
|
|||||||
y: 0,
|
y: 0,
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
click(){
|
increase(step, event){
|
||||||
this.counter++;
|
this.counter+= step;
|
||||||
},
|
},
|
||||||
updateCoordinates(event){
|
updateCoordinates(event){
|
||||||
this.x = event.clientX;
|
this.x = event.clientX;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id='app'>
|
<div id='app'>
|
||||||
<button @click="click">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}} </p>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user