[LayaAirIDE 1.0]dialog的popup方法不会关闭其他弹窗

使用layaboxIDE版本1.7.22。
调用dialog对象里面的popup方法触发弹窗, 弹窗没有图层蒙版也没有关闭其他dialog
登录界面的代码:
class LoginView extends ui.loginUI {
normalDialog: NormalDialog;
constructor() {
super(); 
this.btn_signin.on(Laya.Event.CLICK, null, () => {
this.showDialog("登录成功")
});
this.btn_register.on(Laya.Event.CLICK, null, () => {
this.showDialog("注册功能暂未开放")
}); 

showDialog(context: string) {
// if (this.normalDialog) {
// this.normalDialog.close();
// }
this.normalDialog = new NormalDialog(context);
this.normalDialog.popup(true, true);
Laya.stage.addChild(this.normalDialog); 

}
 
 
// 弹窗代码
 
class NormalDialog extends ui.normalDialogUI {
constructor(
text: string
) {
super();
// 设置label文字
this.context.text = text;
this.btn_close.on(Laya.Event.CLICK, this, this.close);
this.btn_success.on(Laya.Event.CLICK, this, this.close);
}
}
已邀请:

AerTims

赞同来自:

Laya.stage.addChild(this.normalDialog);  这句话删掉 dialog会被DialogManager管理,不用你自己添加到舞台

要回复问题请先

商务合作
商务合作