feat(core): 增强核心事件通讯总线,增强跨组件交互能力
This commit is contained in:
8
components/diy-components/minx.js
Normal file
8
components/diy-components/minx.js
Normal file
@@ -0,0 +1,8 @@
|
||||
export default {
|
||||
methods: {
|
||||
// 异步触发事件
|
||||
async __$emitEvent(payload = {eventName: '__unnamedEvent', data: {}, promiseCallback: null}) {
|
||||
await this.$eventBus?.emit(payload.eventName, payload.data, payload.promiseCallback)
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user