我有这个VueJS 2模板
var aThing = Vue.component('something',{
template :` <button @click="$emit('custom-event','hello there')">Click me</button>`});
Run Code Online (Sandbox Code Playgroud)
是否可以将实际推送的按钮作为参数传递给$emit?例如,click如果它通常被传递,但事件可以在这样的函数中加入
function(event){
event.target; //I want this
}
Run Code Online (Sandbox Code Playgroud)
这是我的问题的一个方面