子窗口改为specified模式.但是复用启用尚未开发完,所以存在多窗口问题
This commit is contained in:
parent
9e3f93daf9
commit
d1709c3dec
@ -41,7 +41,6 @@ export class UIMode{
|
||||
|
||||
//窗体保存容器
|
||||
export let subWins:Map<string,SubWinInfo>=new Map<string,SubWinInfo>;
|
||||
export let subStage:Array<string>=[];
|
||||
export let uiMode:UIMode=new UIMode(true);
|
||||
//随机ID
|
||||
export function RndId(): string {
|
||||
@ -154,16 +153,13 @@ export function EventWin(event:TitleButton){
|
||||
}else if(event?.btnEvent.command=='Page_Options'){
|
||||
winInfo=new SubWinInfo(event.btnName,event.btnEvent.page,mdwInfo.winWidth*0.6,mdwInfo.winHeight*0.8);
|
||||
}
|
||||
if(subStage.indexOf(event.btnName)===-1){
|
||||
let ctx = mdwInfo.win?.getUIContext().getHostContext() as common.UIAbilityContext;
|
||||
EventSubAbility(ctx).then((result) => {
|
||||
if(result){
|
||||
let context =mdwInfo.win?.getUIContext().getHostContext()?.getApplicationContext();
|
||||
context?.eventHub.emit('InitSubWindow',winInfo);
|
||||
}
|
||||
});
|
||||
subStage.push(event.btnName);
|
||||
}
|
||||
let ctx = mdwInfo.win?.getUIContext().getHostContext() as common.UIAbilityContext;
|
||||
EventSubAbility(ctx).then((result) => {
|
||||
if(result){
|
||||
let context =mdwInfo.win?.getUIContext().getHostContext()?.getApplicationContext();
|
||||
context?.eventHub.emit('InitSubWindow',winInfo);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user