From 0a913b1904c6624ea3217965dcffb8c677fba520 Mon Sep 17 00:00:00 2001 From: yuyaozhi Date: Wed, 7 Jun 2023 14:46:03 +0800 Subject: [PATCH] Fix docs vod of ability Signed-off-by: yuyaozhi --- .../application-models/access-dataability.md | 2 +- .../application-models/application-context-fa.md | 4 ++-- .../application-models/connect-serviceability.md | 10 +++++----- .../apis/js-apis-inner-ability-dataAbilityHelper.md | 2 +- ...s-apis-inner-application-serviceExtensionContext.md | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/zh-cn/application-dev/application-models/access-dataability.md b/zh-cn/application-dev/application-models/access-dataability.md index df3135e4ba..2c50a5bb09 100644 --- a/zh-cn/application-dev/application-models/access-dataability.md +++ b/zh-cn/application-dev/application-models/access-dataability.md @@ -23,7 +23,7 @@ // 作为参数传递的URI,与config中定义的URI的区别是多了一个"/",有三个"/" import featureAbility from '@ohos.ability.featureAbility' import ohos_data_ability from '@ohos.data.dataAbility' - import ohos_data_rdb from '@ohos.data.rdb' + import relationalStore from '@ohos.data.relationalStore' let urivar = "dataability:///com.ix.DataAbility" let DAHelper = featureAbility.acquireDataAbilityHelper(urivar); diff --git a/zh-cn/application-dev/application-models/application-context-fa.md b/zh-cn/application-dev/application-models/application-context-fa.md index 5b65e248df..db94dee39d 100644 --- a/zh-cn/application-dev/application-models/application-context-fa.md +++ b/zh-cn/application-dev/application-models/application-context-fa.md @@ -48,13 +48,13 @@ let context = featureAbility.getContext() ```ts import featureAbility from '@ohos.ability.featureAbility' - import bundle from '@ohos.bundle'; + import bundleManager from '@ohos.bundle.bundleManager'; export default { onCreate() { // 获取context并调用相关方法 let context = featureAbility.getContext(); - context.setDisplayOrientation(bundle.DisplayOrientation.LANDSCAPE).then(() => { + context.setDisplayOrientation(bundleManager.DisplayOrientation.LANDSCAPE).then(() => { console.info("Set display orientation.") }) console.info('Application onCreate') diff --git a/zh-cn/application-dev/application-models/connect-serviceability.md b/zh-cn/application-dev/application-models/connect-serviceability.md index 732bf766e8..b0f17f5b8e 100644 --- a/zh-cn/application-dev/application-models/connect-serviceability.md +++ b/zh-cn/application-dev/application-models/connect-serviceability.md @@ -17,14 +17,14 @@ PageAbility创建连接本地ServiceAbility回调实例的代码以及连接本 ```ts import rpc from "@ohos.rpc" -import prompt from '@system.prompt' +import promptAction from '@ohos.promptAction' import featureAbility from '@ohos.ability.featureAbility' let option = { onConnect: function onConnectCallback(element, proxy) { console.info(`onConnectLocalService onConnectDone`) if (proxy === null) { - prompt.showToast({ + promptAction.showToast({ message: "Connect service failed" }) return @@ -34,19 +34,19 @@ let option = { let option = new rpc.MessageOption() data.writeInterfaceToken("connect.test.token") proxy.sendRequest(0, data, reply, option) - prompt.showToast({ + promptAction.showToast({ message: "Connect service success" }) }, onDisconnect: function onDisconnectCallback(element) { console.info(`onConnectLocalService onDisconnectDone element:${element}`) - prompt.showToast({ + promptAction.showToast({ message: "Disconnect service success" }) }, onFailed: function onFailedCallback(code) { console.info(`onConnectLocalService onFailed errCode:${code}`) - prompt.showToast({ + promptAction.showToast({ message: "Connect local service onFailed" }) } diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-ability-dataAbilityHelper.md b/zh-cn/application-dev/reference/apis/js-apis-inner-ability-dataAbilityHelper.md index d2c9e1e07f..553edd2ee1 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inner-ability-dataAbilityHelper.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inner-ability-dataAbilityHelper.md @@ -18,7 +18,7 @@ import ability from '@ohos.ability.ability'; 使用前根据具体情况引入如下模块 ```ts import ohos_data_ability from '@ohos.data.dataAbility'; -import ohos_data_rdb from '@ohos.data.rdb'; +import relationalStore from '@ohos.data.relationalStore' ``` ## DataAbilityHelper.openFile diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md index dcb828119f..0bce4ed066 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md @@ -985,7 +985,7 @@ terminateSelf(callback: AsyncCallback<void>): void; terminateSelf(): Promise<void>; -停止自身。通过Promise返回结果。 +停止ability自身。通过Promise返回结果。 **系统能力**:SystemCapability.Ability.AbilityRuntime.Core -- GitLab