mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 14:10:29 +08:00
插件就绪事件示例
This commit is contained in:
parent
02a708c6f7
commit
fdd9a346a5
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user