v-on参数传递的问题,多个参数传递,和传递浏览器对象
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div id="app">
<button @click="btnclick">按钮</button>
<button @click="btnclick2($event,$event)">按钮</button>
<button>按钮</button>
</div>
<script src="../vue.js"></script>
<script>
const app = new Vue({
el: '#app',
data: {
message: 'hello',
},
methods:{
// 打印出一个对象
btnclick(event){
console.log(event)
},
btnclick2(abc,event){
console.log(abc,'------',event)
}
}
})
</script>
</body>
</html>