From fb6f85c71b4aa610f97dac011a9a0bf3d46a8c76 Mon Sep 17 00:00:00 2001 From: RayShih Date: Thu, 24 Mar 2022 21:12:52 +0800 Subject: [PATCH] fix review problems Signed-off-by: RayShih --- .../application-dev/ability/fa-pageability.md | 27 +++++++++---------- .../quick-start/package-structure.md | 4 +-- .../reference/apis/js-apis-Bundle.md | 2 +- .../reference/apis/js-apis-ability-context.md | 22 +++++++-------- .../apis/js-apis-application-MissionInfo.md | 2 -- .../js-apis-application-MissionSnapshot.md | 2 -- .../reference/apis/js-apis-missionManager.md | 11 ++++---- 7 files changed, 33 insertions(+), 37 deletions(-) diff --git a/zh-cn/application-dev/ability/fa-pageability.md b/zh-cn/application-dev/ability/fa-pageability.md index 0c8426bcc7..e9675773dc 100644 --- a/zh-cn/application-dev/ability/fa-pageability.md +++ b/zh-cn/application-dev/ability/fa-pageability.md @@ -62,32 +62,31 @@ featureAbility.startAbility({ entities: [""], type: "", options: { - // indicates the grant to perform read operations on the URI + // Grant the permission to perform read operations on the URI. authReadUriPermission: true, - // indicates the grant to perform write operations on the URI + // Grant the permission to perform write operations on the URI. authWriteUriPermission: true, - // support forward intent result to origin ability + // support forwarding the intent result to the ability. abilityForwardResult: true, - // used for marking the ability start-up is triggered by continuation + // Enable abiligy continuation. abilityContinuation: true, - // specifies whether a component does not belong to ohos + // Specify that a component does not belong to ohos. notOhosComponent: true, - // specifies whether an ability is started + // Specify that an ability is started. abilityFormEnabled: true, - // indicates the grant for possible persisting on the URI. + // Grant the permission for possible persisting on the URI. authPersistableUriPermission: true, - // indicates the grant for possible persisting on the URI. + // Grant the permission for possible persisting on the prefix URI. authPrefixUriPermission: true, - // support distributed scheduling system start up multiple devices + // Support distributed scheduling system startup on multiple devices. abilitySliceMultiDevice: true, - // indicates that an ability using the service template is started regardless of whether the - // host application has been started. + // A service ability is started regardless of whether the host application has been started. startForegroundAbility: true, - // install the specified ability if it's not installed. + // Install the specified ability if it is not installed. installOnDemand: true, - // return result to origin ability slice + // Return the result to the ability slice. abilitySliceForwardResult: true, - // install the specified ability with background mode if it's not installed. + // Install the specified ability with background mode if it is not installed. installWithBackgroundMode: true }, deviceId: "", diff --git a/zh-cn/application-dev/quick-start/package-structure.md b/zh-cn/application-dev/quick-start/package-structure.md index 2febf57cd4..1339bdb9a6 100644 --- a/zh-cn/application-dev/quick-start/package-structure.md +++ b/zh-cn/application-dev/quick-start/package-structure.md @@ -719,8 +719,8 @@ distroFilter示例: "screenWindow": { "policy": "include", "value": ["454*454","466*466"] - }, - “screenDensity”:{ + }, + "screenDensity":{ "policy": "exclude", "value": ["ldpi","xldpi"] }, diff --git a/zh-cn/application-dev/reference/apis/js-apis-Bundle.md b/zh-cn/application-dev/reference/apis/js-apis-Bundle.md index aaa75bf956..14335b5f96 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-Bundle.md +++ b/zh-cn/application-dev/reference/apis/js-apis-Bundle.md @@ -1095,7 +1095,7 @@ bundle.getAbilityIcon(bundleName, abilityName) getAbilityIcon(bundleName: string, abilityName: string, callback: AsyncCallback\): void; -以异步方法通过bundleName和abilityName获取对应的[PixelMap](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-image.md),使用callback形式返回结果。 +以异步方法通过bundleName和abilityName获取对应Icon的[PixelMap](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-image.md),使用callback形式返回结果。 **需要权限:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-ability-context.md b/zh-cn/application-dev/reference/apis/js-apis-ability-context.md index 981fabe2e0..1a2f8118b3 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-ability-context.md +++ b/zh-cn/application-dev/reference/apis/js-apis-ability-context.md @@ -10,10 +10,10 @@ Ability的上下文环境,继承自Context。 ## 使用说明 -​在使用AbilityContext的功能前,需要通过Ability子类实例获取。 +在使用AbilityContext的功能前,需要通过Ability子类实例获取。 + - ```js import Ability from '@ohos.application.Ability' class MainAbility extends Ability { @@ -250,7 +250,7 @@ terminateSelf(callback: AsyncCallback<void>): void; ```js this.context.terminateSelf((err) => { - console.log('terminateSelf result:' + JSON.stringfy(err)); + console.log('terminateSelf result:' + JSON.stringify(err)); }); ``` @@ -273,9 +273,9 @@ terminateSelf(): Promise<void>; ```js this.context.terminateSelf(want).then((data) => { - console.log('success:' + JSON.stringfy(data)); + console.log('success:' + JSON.stringify(data)); }).catch((error) => { - console.log('failed:' + JSON.stringfy(error)); + console.log('failed:' + JSON.stringify(error)); }); ``` @@ -404,7 +404,7 @@ requestPermissionsFromUser(permissions: Array<string>, requestCallback: As ``` this.context.requestPermissionsFromUser(permissions,(result) => { - console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result)); + console.log('requestPermissionsFromUserresult:' + JSON.stringify(result)); }); ``` @@ -433,9 +433,9 @@ requestPermissionsFromUser(permissions: Array<string>) : Promise<Permis ``` this.context.requestPermissionsFromUser(permissions).then((data) => { - console.log('success:' + JSON.stringfy(data)); + console.log('success:' + JSON.stringify(data)); }).catch((error) => { - console.log('failed:' + JSON.stringfy(error)); + console.log('failed:' + JSON.stringify(error)); }); ``` @@ -459,7 +459,7 @@ setMissionLabel(label: string, callback:AsyncCallback<void>): void; ```js this.context.setMissionLabel("test",(result) => { - console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result)); + console.log('requestPermissionsFromUserresult:' + JSON.stringify(result)); }); ``` @@ -488,9 +488,9 @@ setMissionLabel(label: string): Promise<void> ```js this.context.setMissionLabel("test").then((data) => { - console.log('success:' + JSON.stringfy(data)); + console.log('success:' + JSON.stringify(data)); }).catch((error) => { - console.log('failed:' + JSON.stringfy(error)); + console.log('failed:' + JSON.stringify(error)); }); ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-MissionInfo.md b/zh-cn/application-dev/reference/apis/js-apis-application-MissionInfo.md index 2b0430077d..7d8d822f2f 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-application-MissionInfo.md +++ b/zh-cn/application-dev/reference/apis/js-apis-application-MissionInfo.md @@ -9,8 +9,6 @@ Ability对应的任务信息。 ## 导入模块 -使用前需导入Want - ``` import Want from '@ohos.application.Want'; diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-MissionSnapshot.md b/zh-cn/application-dev/reference/apis/js-apis-application-MissionSnapshot.md index 667b42b38b..7327a29524 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-application-MissionSnapshot.md +++ b/zh-cn/application-dev/reference/apis/js-apis-application-MissionSnapshot.md @@ -10,8 +10,6 @@ ## 导入模块 -使用前需导入ElementName和image - ``` import { ElementName } from '../bundle/elementName'; diff --git a/zh-cn/application-dev/reference/apis/js-apis-missionManager.md b/zh-cn/application-dev/reference/apis/js-apis-missionManager.md index e2b82cfe94..23eea8516f 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-missionManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-missionManager.md @@ -9,7 +9,7 @@ missionManager模块提供系统任务管理能力,开发者可以对系统任 ## 导入模块 - + ``` import missionManager from '@ohos.application.missionManager' @@ -390,9 +390,10 @@ unlockMission(missionId: number, callback: AsyncCallback<void>): void; **参数:** - | 参数名 | 类型 | 必填 | 说明 | - | -------- | -------- | -------- | -------- | - | missionId | number | 是 | 任务ID。 | +| 参数名 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| missionId | number | 是 | 任务ID。 | +| callback | AsyncCallback<void> | 是 | 执行结果回调函数。 | **示例:** @@ -620,7 +621,7 @@ moveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCall moveMissionToFront(missionId: number, options?: StartOptions): Promise<void>; -把指定任务id的任务切到前台,以promise的方式返回。 +把指定任务id的任务切到前台,同时指定任务切换到前台时的启动参数,例如窗口模式、设备ID等,以promise的方式返回。 **系统能力**:SystemCapability.Ability.AbilityRuntime.Mission -- GitLab