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