1、事件定义
<button @click="log1" type="default">按钮</button>
log1(){
console.log(1111111);
},
2、事件传参
<button @click="logn(8)" type="default">按钮logn(8)</button>
logn(n){
console.log(n);
},
通过event
<button type="default" @click="handleEvent('天亮教育',$event)">点击事件</button>
handleEvent(name,e){
console.log('点击了按钮');
console.log(name);
console.log(e);
},