From fdd9a346a5885913ae2c5149697d9b96fb7fdaf7 Mon Sep 17 00:00:00 2001 From: cool Date: Fri, 26 Apr 2024 11:01:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=B0=B1=E7=BB=AA=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/demo/event/comm.ts | 9 +++++++++ 1 file changed, 9 insertions(+) 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); + } }