From bb5e7ab3a480a226e3ad00204a4167f0a90cda0f Mon Sep 17 00:00:00 2001 From: dgflash Date: Sat, 26 Apr 2025 13:11:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DLayerDialog=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E5=9C=A8=E6=9C=89=E9=98=9F=E5=88=97=E6=97=B6=E5=90=8E=E9=9D=A2?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E8=B0=83=E7=94=A8=20oops.gui.removeByNode(th?= =?UTF-8?q?is.node);=20=E6=97=A0=E6=B3=95=E5=85=B3=E9=97=AD=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/core/gui/layer/LayerDialog.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/core/gui/layer/LayerDialog.ts b/assets/core/gui/layer/LayerDialog.ts index 796ace2..864143f 100644 --- a/assets/core/gui/layer/LayerDialog.ts +++ b/assets/core/gui/layer/LayerDialog.ts @@ -11,6 +11,7 @@ import { UIConfig } from "./UIConfig"; /** 模式弹窗数据 */ type DialogParam = { + uiid: number; config: UIConfig; params?: any; callbacks?: UICallbacks; @@ -27,6 +28,7 @@ export class LayerDialog extends LayerPopUp { // 控制同一时间只能显示一个模式窗口 if (this.ui_nodes.size > 0) { this.params.push({ + uiid: uiid, config: config, params: params, callbacks: callbacks, @@ -56,9 +58,7 @@ export class LayerDialog extends LayerPopUp { protected onCloseWindow(vp: ViewParams) { super.onCloseWindow(vp); - setTimeout(() => { - this.next(vp); - }, 0); + setTimeout(this.next.bind(this), 0); } protected setBlackDisable() { @@ -69,10 +69,10 @@ export class LayerDialog extends LayerPopUp { } } - private next(vp: ViewParams) { + private next() { if (this.params.length > 0) { let param = this.params.shift()!; - this.show(vp.uiid, param.config, param.params, param.callbacks); + this.show(param.uiid, param.config, param.params, param.callbacks); } } } \ No newline at end of file -- Gitee