console
new Vue({
el:'#app',
data:{
value:'',
value1:'',
arguments:0
},
methods:{
click:function(){
alert('haha');
},
showValue:function(event){
this.value = event.target.value;
},
showValue1:function(event){
this.value1 = event.target.value;
},
testArguments:function(step1, step2, e){
console.log(e);
this.arguments += (step1 + step2);
}
}
})
<div id="app">
<button v-on:click='click'>Click to Alert</button>
<button v-on:click='testArguments(1,2,$event)'>Test Arguments</button><span>{{arguments}}</span>
<p><input v-on:keyup='showValue' type="text">{{value}}</p>
<p><input v-on:keyup.enter.space.13='showValue1' type="text">{{value1}}</p>
</div>