I am working with a VueJS 2 template
var aThing = Vue.component('something',{
template :` <button @click="$emit('custom-event','hello there')">Click me</button>`});
Can the actual button that was clicked be passed as an argument to $emit
? Normally in the click
event, the event itself is passed and can be accessed in a function like this
function(event){
event.target; //I need this
}
This is the issue I am facing.