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,
|
||||
},
|
||||
methods:{
|
||||
click(){
|
||||
this.counter++;
|
||||
increase(step, event){
|
||||
this.counter+= step;
|
||||
},
|
||||
updateCoordinates(event){
|
||||
this.x = event.clientX;
|
||||
|
@ -7,7 +7,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id='app'>
|
||||
<button @click="click">Click Me</button>
|
||||
<button @click="increase(2, $event)">Click Me</button>
|
||||
<p>{{ counter }}</p>
|
||||
<p v-on:mousemove="updateCoordinates">Coordinates {{x}} {{y}} </p>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user