From 6d9a8f40502e630468c5e72e0c8e5bfea0174bc6 Mon Sep 17 00:00:00 2001 From: dgflash Date: Thu, 14 Aug 2025 09:16:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E8=A1=A5?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/core/gui/GuiEnum.ts | 1 + assets/core/gui/layer/Defines.ts | 1 - assets/core/gui/layer/LayerDialog.ts | 10 +++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/assets/core/gui/GuiEnum.ts b/assets/core/gui/GuiEnum.ts index c9a3a19..45ef620 100644 --- a/assets/core/gui/GuiEnum.ts +++ b/assets/core/gui/GuiEnum.ts @@ -1,3 +1,4 @@ +/** 框架提示资源路径 */ export enum PromptResType { /** 飘动提示 */ Toast = 'common/prefab/notify', diff --git a/assets/core/gui/layer/Defines.ts b/assets/core/gui/layer/Defines.ts index 18e6235..4cddfe9 100644 --- a/assets/core/gui/layer/Defines.ts +++ b/assets/core/gui/layer/Defines.ts @@ -5,7 +5,6 @@ * @LastEditTime: 2023-01-09 11:52:38 */ import { Node } from "cc"; -import { Uiid } from "./LayerEnum"; import { UIConfig } from "./UIConfig"; /*** 界面回调参数对象定义 */ diff --git a/assets/core/gui/layer/LayerDialog.ts b/assets/core/gui/layer/LayerDialog.ts index 864143f..68b2965 100644 --- a/assets/core/gui/layer/LayerDialog.ts +++ b/assets/core/gui/layer/LayerDialog.ts @@ -11,9 +11,13 @@ import { UIConfig } from "./UIConfig"; /** 模式弹窗数据 */ type DialogParam = { - uiid: number; + /** 弹窗唯一编号 */ + uiid: string; + /** 窗口配置 */ config: UIConfig; + /** 窗口附加参数 */ params?: any; + /** 窗口回调 */ callbacks?: UICallbacks; } @@ -24,7 +28,7 @@ export class LayerDialog extends LayerPopUp { /** 窗口调用参数队列 */ private params: Array = []; - add(uiid: number, config: UIConfig, params?: any, callbacks?: UICallbacks) { + add(uiid: string, config: UIConfig, params?: any, callbacks?: UICallbacks) { // 控制同一时间只能显示一个模式窗口 if (this.ui_nodes.size > 0) { this.params.push({ @@ -40,7 +44,7 @@ export class LayerDialog extends LayerPopUp { } /** 显示模式弹窗 */ - private show(uiid: number, config: UIConfig, params?: any, callbacks?: UICallbacks) { + private show(uiid: string, config: UIConfig, params?: any, callbacks?: UICallbacks) { let vp = this.ui_cache.get(config.prefab); if (vp == null) { vp = new ViewParams();