From 61e613bd4a6032ce7789e40516d8e04daf5cc398 Mon Sep 17 00:00:00 2001 From: COOL Date: Wed, 21 May 2025 11:32:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20onServerReadyOnce=20?= =?UTF-8?q?=E5=8F=AA=E8=A7=A6=E5=8F=91=E4=B8=80=E6=AC=A1=E7=9A=84=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/package.json | 2 +- core/src/configuration.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/package.json b/core/package.json index d0fe2fe..d5939fa 100644 --- a/core/package.json +++ b/core/package.json @@ -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", diff --git a/core/src/configuration.ts b/core/src/configuration.ts index 290a3f8..4f78b39 100644 --- a/core/src/configuration.ts +++ b/core/src/configuration.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(); } }