mirror of
https://github.com/cool-team-official/cool-admin-midway-packages.git
synced 2025-12-10 13:23:22 +00:00
新增 onServerReadyOnce 只触发一次的事件
This commit is contained in:
parent
87bcda844e
commit
61e613bd4a
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cool-midway/core",
|
||||
"version": "8.0.4",
|
||||
"version": "8.0.5",
|
||||
"description": "cool-admin midway core",
|
||||
"main": "dist/index.js",
|
||||
"typings": "index.d.ts",
|
||||
|
||||
@ -50,6 +50,7 @@ export class CoolConfiguration implements ILifeCycle {
|
||||
|
||||
async onReady(container: IMidwayContainer) {
|
||||
this.coolEventManager.emit('onReady');
|
||||
this.coolEventManager.globalEmit('onReadyOnce', true);
|
||||
// 处理模块配置
|
||||
await container.getAsync(CoolModuleConfig);
|
||||
// 常用函数处理
|
||||
@ -87,6 +88,7 @@ export class CoolConfiguration implements ILifeCycle {
|
||||
const eps: CoolEps = await container.getAsync(CoolEps);
|
||||
eps.init();
|
||||
this.coolEventManager.emit('onServerReady');
|
||||
this.coolEventManager.globalEmit('onServerReadyOnce', true);
|
||||
// location.clean();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user