|
楼主 |
发表于 2018-7-5 21:10:40
|
显示全部楼层
在主页面创建:contents1
this.shellImpl = new ShellImpl(this, {
contentsXid : "contents1",
pageMappings : {
"index":{ //主页
url : require.toUrl('./index.w')
},
"test":{ //测试页
url : require.toUrl('./test.w')
}
}
});
通过按钮调用子页面显示:
Model.prototype.btnOpenTest2Click = function(event){
justep.Shell.showPage("test");
};
子页面的返回按钮事件:
Model.prototype.backBtnClick = function(event){
justep.Shell.closePage();
};
Model.prototype.modelUnLoad = function(event){
console.log("modelUnLoad 调用");
};
经过测试,子页面返回时,控制台输出了内容:
目前这种方式是可以激活onunload事件;
|
|