未验证 提交 9d745660 编写于 作者: O openharmony_ci 提交者: Gitee

!4886 编译报错修改

Merge pull request !4886 from 章靖/master
...@@ -16,7 +16,6 @@ export default class MainAbility extends Ability { ...@@ -16,7 +16,6 @@ export default class MainAbility extends Ability {
// Main window is created, set main page for this ability // Main window is created, set main page for this ability
console.log("[Demo] MainAbility onWindowStageCreate windowStage="+ windowStage) console.log("[Demo] MainAbility onWindowStageCreate windowStage="+ windowStage)
globalThis.windowStage = windowStage globalThis.windowStage = windowStage
globalThis.abilityStorage = this.storage
globalThis.abilityContext = this.context globalThis.abilityContext = this.context
windowStage.setUIContent(this.context, "MainAbility/pages/web", null) windowStage.setUIContent(this.context, "MainAbility/pages/web", null)
} }
...@@ -35,4 +34,4 @@ export default class MainAbility extends Ability { ...@@ -35,4 +34,4 @@ export default class MainAbility extends Ability {
// Ability has back to background // Ability has back to background
console.log("[Demo] MainAbility onBackground") console.log("[Demo] MainAbility onBackground")
} }
}; };
\ No newline at end of file
...@@ -19,7 +19,7 @@ export default class Utils { ...@@ -19,7 +19,7 @@ export default class Utils {
static sleep(time){ static sleep(time){
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
setTimeout(()=>{ setTimeout(()=>{
resolve() resolve("ok")
},time) },time)
}).then(()=>{ }).then(()=>{
console.info(`sleep ${time} over...`) console.info(`sleep ${time} over...`)
...@@ -60,4 +60,4 @@ export default class Utils { ...@@ -60,4 +60,4 @@ export default class Utils {
console.info("webFlag emit action state err: " + JSON.stringify(err)); console.info("webFlag emit action state err: " + JSON.stringify(err));
} }
} }
} }
\ No newline at end of file
...@@ -241,5 +241,5 @@ export default function webJsunit() { ...@@ -241,5 +241,5 @@ export default function webJsunit() {
Utils.registerEvent("backOrForward","index",138,done); Utils.registerEvent("backOrForward","index",138,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
} })
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册