提交 532bc9ad 编写于 作者: H huangdong57

UIContent报错解决

Signed-off-by: Nhuangdong57 <huangdong57@huawei.com>
上级 8afacda3
...@@ -51,8 +51,11 @@ export default class TestAbility extends Ability { ...@@ -51,8 +51,11 @@ export default class TestAbility extends Ability {
return; return;
} }
windowClass = data; windowClass = data;
try{
globalThis.uiContent = windowClass.getUIContext(); globalThis.uiContent = windowClass.getUIContext();
} catch(err){
console.info("windowClass getUIContext is error" + JSON.stringify(err))
}
console.info('Succeeded in obtaining the main window. Data: ' + JSON.stringify(data)); console.info('Succeeded in obtaining the main window. Data: ' + JSON.stringify(data));
}); });
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册