在自定义文件consumer-action.wxml中添加点击事件
在consumer-action.js中实现点击事件,使用triggerEvent传递事件
......
methods: {
handleOrder(event) {
this.triggerEvent('chat')
},
handleChat(event) {
this.triggerEvent('order')
}
}
......
2、在调用自定义组件的布局文件中接收方法事件回调
在service-detail.wxml中实现自定义组件点击监听
bind:chat和bind:order中的chat和order和triggerEvent中定义的事件名一致
......
......
3、实现方法
在service-detail.js中监听点击方法
......
handleUpdate(event) {
},
handleOrder() {
}, handleChat() {
}, handleEdit() {
},
......



