未验证 提交 c2feb7b8 编写于 作者: 葛亚芳 提交者: Gitee

update zh-cn/application-dev/database/database-preference-guidelines.md.

Signed-off-by: N葛亚芳 <geyafang@huawei.com>
上级 77427fed
...@@ -113,10 +113,10 @@ ...@@ -113,10 +113,10 @@
```ts ```ts
// 获取context // 获取context
import Ability from '@ohos.application.Ability' import UIAbility from '@ohos.app.ability.UIAbility'
let context = null; let context = null;
let preferences = null; let preferences = null;
export default class MainAbility extends Ability { export default class EntryAbility extends UIAbility {
onWindowStageCreate(windowStage){ onWindowStageCreate(windowStage){
context = this.context; context = this.context;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册