4.1 事件的监听与处理
事件监听的用法:
可以直接将要执行的逻辑代码放入@click赋值的地方
<button @click="this.count+=1">点击</button>
可以用$event传递系统的Event对象参数
<button @click="click(2,$event)">点击</button>
click(step,event){
console.log(event)
this.count+=step
}
多事件处理: