“a72f68f223a5b3b99e4b43a54a0e17969d198740”上不存在“cmake/git@gitcode.net:s920243400/PaddleDetection.git”
未验证 提交 8dc829f2 编写于 作者: O openharmony_ci 提交者: Gitee

!13184 【元能力】BaseContext等文档优化

Merge pull request !13184 from HuangXW/DocModify
# BaseContext # BaseContext
BaseContext抽象类用于表示继承的子类Context是Stage模型还是FA模型。 BaseContext抽象类用于表示继承的子类Context是Stage模型还是FA模型,是所有Context类型的父类
> **说明:** > **说明:**
> >
...@@ -14,10 +14,15 @@ BaseContext抽象类用于表示继承的子类Context是Stage模型还是FA模 ...@@ -14,10 +14,15 @@ BaseContext抽象类用于表示继承的子类Context是Stage模型还是FA模
**示例:** **示例:**
```ts 以Stage模型为例,用户可通过UIAbilityContext访问stageMode字段。
class MyContext extends BaseContext {
constructor(stageMode) { ```ts
this.stageMode = stageMode; import UIAbility from '@ohos.app.ability.UIAbility';
}
class MainAbility extends UIAbility {
onCreate(want, launchParam) {
// MainAbility onCreate, isStageMode: true
console.log("MainAbility onCreate, isStageMode: " + this.context.stageMode);
} }
``` }
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册