未验证 提交 47b73162 编写于 作者: O openharmony_ci 提交者: Gitee

!11003 修复context getUIContent

Merge pull request !11003 from jerry/master
...@@ -209,7 +209,13 @@ export default class MainAbility extends Ability { ...@@ -209,7 +209,13 @@ export default class MainAbility extends Ability {
let context = this.context; let context = this.context;
console.log("[Demo] MainAbility bundleName " + context.abilityInfo.bundleName) console.log("[Demo] MainAbility bundleName " + context.abilityInfo.bundleName)
windowStage.setUIContent(this.context, "pages/index", null) windowStage.loadContent("pages/index", (err, data) => {
if (err.code) {
console.error('Failed to load the content. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data))
});
} }
onWindowStageDestroy() { onWindowStageDestroy() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册