component是一个模态框,想要点击确定按钮的时候,向slot广播一个事件,触发slot组件的一些行为,例如:上传图片等,可是我用$broadcast,slot里面的组件监听不到,请问要怎么改?
component:
slot:
使用:
你在子component里面写个event啊
event: {
'confirm-msg': function(){
.......
}
}
没看到 使用$on 注册事件啊
component是一个模态框,想要点击确定按钮的时候,向slot广播一个事件,触发slot组件的一些行为,例如:上传图片等,可是我用$broadcast,slot里面的组件监听不到,请问要怎么改?
component:
slot:
使用:
你在子component里面写个event啊
event: {
'confirm-msg': function(){
.......
}
}
没看到 使用$on 注册事件啊