diff --git a/src/modules/demo/event/comm.ts b/src/modules/demo/event/comm.ts index 487c162..d45d101 100644 --- a/src/modules/demo/event/comm.ts +++ b/src/modules/demo/event/comm.ts @@ -1,4 +1,5 @@ import { CoolEvent, Event } from '@cool-midway/core'; +import { EVENT_PLUGIN_READY } from '../../plugin/service/center'; /** * 普通事件 @@ -15,4 +16,12 @@ export class DemoCommEvent { console.log(`comm当前进程的ID是: ${process.pid}`); console.log('comm收到消息', msg, a); } + + /** + * 插件已就绪 + */ + @Event(EVENT_PLUGIN_READY) + async pluginReady(keyName: string) { + console.log('插件已就绪', keyName); + } }