1. Only pass in custom parameters
<div id="app">
<button @click="click(myparm)">click</button>
</div>
new Vue({
el: '#app',
methods: {
click: function(event){
console.log(event);
}
}
})
2. Just pass in the event object
<div id="app">
<button @click="click">click</button>
</div>
new Vue({
el: '#app',
methods: {
lick: function(event){
console.log(event);
}
}
})
3. Pass in the event object and custom parameters at the same time
<div id="app">
<button @click="click($event, myparm)">click</button>
</div>
new Vue({
el: '#app',
methods: {
click: function(event, myparm1){
console.log(event);
console.log(myparm1);
}
}
})