提交 e2dec205 编写于 作者: L liuliu

1)修复一个图片展示问题;2)UIAbility热启动示例代码优化

Signed-off-by: Nliuliu <liuliu40@huawei.com>
Change-Id: I9d27bca1a852359c091e8c447360535ebde27e86
上级 4643603a
......@@ -541,18 +541,20 @@ export default class FuncAbility extends UIAbility {
onWindowStageCreate(windowStage: window.WindowStage) {
// Main window is created, set main page for this ability
// ...
let url = 'pages/Index';
if (this.funcAbilityWant?.parameters?.router && this.funcAbilityWant.parameters.router === 'funcA') {
url = 'pages/Second';
}
let windowClass: window.Window;
windowStage.getMainWindow((err, data) => {
windowStage.loadContent(url, (err, data) => {
if (err.code) {
return;
}
let windowClass: window.Window;
windowStage.getMainWindow((err, data) => {
if (err.code) {
console.error(TAG, `Failed to obtain the main window. Code is ${err.code}, message is ${err.message}`);
console.error(`Failed to obtain the main window. Code is ${err.code}, message is ${err.message}`);
return;
}
windowClass = data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册