Vue带参数的事件对象带参数和事件源调用方法 $event
<script>
export default {
data(){
return{
message:0,
put1:'96net.com.cn',
}
},
methods:{
dianji(p,event){
console.log(p);
console.log(event);
}
}
}
</script>
<template>
<div>
<div>{{message}}</div>
<div :tit="put1" @click="dianji(put1,$event)">点击</div>
</div>
</template>