From a012cb465774c67a7b77ddf8492bb39a7337ab46 Mon Sep 17 00:00:00 2001 From: wusongqing Date: Wed, 22 Jun 2022 16:54:25 +0800 Subject: [PATCH] correct typos Signed-off-by: wusongqing --- .../reference/apis/js-apis-ability-context.md | 136 +++++++++--------- .../apis/js-apis-abilityrunninginfo.md | 2 +- .../reference/apis/js-apis-appmanager.md | 6 +- .../reference/apis/js-apis-audio.md | 14 +- .../reference/apis/js-apis-camera.md | 4 +- .../reference/apis/js-apis-media.md | 2 +- .../apis/js-apis-system-parameter.md | 2 +- .../reference/apis/js-apis-uri.md | 6 +- .../reference/apis/js-apis-wantAgent.md | 2 +- 9 files changed, 87 insertions(+), 87 deletions(-) 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 1173591db7..1d3e33ef78 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 @@ -43,10 +43,10 @@ startAbility(want: Want, callback: AsyncCallback<void>): void **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | -| callback | AsyncCallback<void> | 是 | callback形式返回启动结果。 | +| want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | +| callback | AsyncCallback<void> | 是 | callback形式返回启动结果。 | **示例**: @@ -71,11 +71,11 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void& **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | +| want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | | options | StartOptions | 是 | 启动Ability所携带的参数。 | -| callback | AsyncCallback<void> | 是 | callback形式返回启动结果。 | +| callback | AsyncCallback<void> | 是 | callback形式返回启动结果。 | **示例**: @@ -104,16 +104,16 @@ startAbility(want: Want, options: StartOptions): Promise<void> **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | +| want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | | options | StartOptions | 是 | 启动Ability所携带的参数。 | **返回值**: -| 类型 | 说明 | +| 类型 | 说明 | | -------- | -------- | -| Promise<void> | Promise形式返回启动结果。 | +| Promise<void> | Promise形式返回启动结果。 | **示例**: ```js @@ -143,15 +143,15 @@ startAbilityByCall(want: Want): Promise<Caller> **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | 是 | 传入需要启动的ability的信息,包含ability名称、包名、设备ID,设备ID缺省或为空表示启动本地ability。 | +| want | [Want](js-apis-featureAbility.md#Want) | 是 | 传入需要启动的ability的信息,包含ability名称、包名、设备ID,设备ID缺省或为空表示启动本地ability。 | **返回值**: -| 类型 | 说明 | +| 类型 | 说明 | | -------- | -------- | -| Promise<Caller> | 获取要通讯的caller对象。 | +| Promise<Caller> | 获取要通讯的caller对象。 | **示例**: @@ -184,11 +184,11 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\< **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | -| accountId | number | 是 | 账户ID。 | -| callback | AsyncCallback<void> | 是 | callback形式返回启动结果。 | +| want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | +| accountId | number | 是 | 账户ID。 | +| callback | AsyncCallback<void> | 是 | callback形式返回启动结果。 | **示例**: @@ -214,12 +214,12 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | -| accountId | number | 是 | 账户ID。 | +| want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | +| accountId | number | 是 | 账户ID。 | | options | StartOptions | 是 | 启动Ability所携带的参数。 | -| callback | AsyncCallback<void> | 是 | callback形式返回启动结果。 | +| callback | AsyncCallback<void> | 是 | callback形式返回启动结果。 | **示例**: @@ -249,17 +249,17 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | +| want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | | accountId | number | 是 | 账户ID。 | | options | StartOptions | 否 | 启动Ability所携带的参数。 | **返回值**: -| 类型 | 说明 | +| 类型 | 说明 | | -------- | -------- | -| Promise<void> | Promise形式返回启动结果。 | +| Promise<void> | Promise形式返回启动结果。 | **示例**: ```js @@ -349,7 +349,7 @@ startAbilityForResult(want: Want, options: StartOptions): Promise<AbilityResu **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | | options | StartOptions | 是 | 启动Ability所携带的参数。 | @@ -446,7 +446,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartO **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | | accountId | number | 是 | 账户ID。 | @@ -482,15 +482,15 @@ terminateSelf(callback: AsyncCallback<void>): void **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| callback | AsyncCallback<void> | 是 | 回调函数,返回接口调用是否成功的结果。 | +| callback | AsyncCallback<void> | 是 | 回调函数,返回接口调用是否成功的结果。 | **示例**: ```js this.context.terminateSelf((err) => { - console.log('terminateSelf result:' + JSON.stringfy(err)); + console.log('terminateSelf result:' + JSON.stringify(err)); }); ``` @@ -504,17 +504,17 @@ terminateSelf(): Promise<void> **返回值**: -| 类型 | 说明 | +| 类型 | 说明 | | -------- | -------- | -| Promise<void> | 返回一个Promise,包含接口的结果。 | +| Promise<void> | 返回一个Promise,包含接口的结果。 | **示例**: ```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)); }); ``` @@ -561,9 +561,9 @@ terminateSelfWithResult(parameter: AbilityResult): Promise<void> | parameter | [AbilityResult](js-apis-featureAbility.md#AbilityResult) | 是 | 返回给startAbilityForResult 调用方的信息。 | **返回值**: -| 类型 | 说明 | +| 类型 | 说明 | | -------- | -------- | -| Promise<void> | promise形式返回停止结果。 | +| Promise<void> | promise形式返回停止结果。 | **示例**: ```js @@ -586,14 +586,14 @@ connectAbility(want: Want, options: ConnectOptions): number **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | | options | ConnectOptions | 是 | 连接的远端对象实例 | **返回值**: -| 类型 | 说明 | +| 类型 | 说明 | | -------- | -------- | | number | 连接Ability的代码 | @@ -630,7 +630,7 @@ connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | | accountId | number | 是 | 账户ID | @@ -638,7 +638,7 @@ connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions **返回值**: -| 类型 | 说明 | +| 类型 | 说明 | | -------- | -------- | | number | 连接Ability的代码 | @@ -676,7 +676,7 @@ disconnectAbility(connection: number, callback:AsyncCallback\): void **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | connection | number | 是 | 连接的Ability的编号。 | | callback | AsyncCallback<void> | 是 | 断开Ability连接的回调函数。 | @@ -700,15 +700,15 @@ disconnectAbility(connection: number): Promise\ **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | connection | number | 是 | 连接的Ability的编号。 | **返回值**: -| 类型 | 说明 | +| 类型 | 说明 | | -------- | -------- | -| Promise<void> | 返回一个Promise。 | +| Promise<void> | 返回一个Promise。 | **示例**: @@ -717,7 +717,7 @@ var connection = 111; this.context.disconnectAbility(connection).then(() => { console.log('disconnect success') }).catch((err) => { - console.log('disconnect filed') + console.log('disconnect failed') }) ``` @@ -731,16 +731,16 @@ setMissionLabel(label: string, callback:AsyncCallback<void>): void **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| label | string | 是 | 显示名称。 | -| callback | AsyncCallback<void> | 是 | 回调函数,返回接口调用是否成功的结果。 | +| label | string | 是 | 显示名称。 | +| callback | AsyncCallback<void> | 是 | 回调函数,返回接口调用是否成功的结果。 | **示例**: ```js this.context.setMissionLabel("test",(result) => { - console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result)); + console.log('requestPermissionsFromUserresult:' + JSON.stringify(result)); }); ``` @@ -755,23 +755,23 @@ setMissionLabel(label: string): Promise\ **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| label | string | 是 | 显示名称。 | +| label | string | 是 | 显示名称。 | **返回值**: -| 类型 | 说明 | +| 类型 | 说明 | | -------- | -------- | -| Promise<void> | 返回一个Promise,包含接口的结果。 | +| Promise<void> | 返回一个Promise,包含接口的结果。 | **示例**: ```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)); }); ``` @@ -785,16 +785,16 @@ requestPermissionsFromUser(permissions: Array<string>, requestCallback: As **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| permissions | Array<string> | 是 | 权限列表。 | -| callback | AsyncCallback<PermissionRequestResult> | 是 | 回调函数,返回接口调用是否成功的结果。 | +| permissions | Array<string> | 是 | 权限列表。 | +| callback | AsyncCallback<PermissionRequestResult> | 是 | 回调函数,返回接口调用是否成功的结果。 | **示例**: ```js this.context.requestPermissionsFromUser(permissions,(result) => { - console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result)); + console.log('requestPermissionsFromUserresult:' + JSON.stringify(result)); }); ``` @@ -809,23 +809,23 @@ requestPermissionsFromUser(permissions: Array<string>) : Promise<Permis **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| permissions | Array<string> | 是 | 权限列表。 | +| permissions | Array<string> | 是 | 权限列表。 | **返回值**: -| 类型 | 说明 | +| 类型 | 说明 | | -------- | -------- | -| Promise<PermissionRequestResult> | 返回一个Promise,包含接口的结果。 | +| Promise<PermissionRequestResult> | 返回一个Promise,包含接口的结果。 | **示例**: ```js 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)); }); ``` @@ -839,9 +839,9 @@ restoreWindowStage(contentStorage: ContentStorage) : void **参数**: -| 参数名 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| contentStorage | ContentStorage | 是 | 用于恢复窗口阶段的存储数据。 | +| contentStorage | ContentStorage | 是 | 用于恢复窗口阶段的存储数据。 | **示例**: diff --git a/zh-cn/application-dev/reference/apis/js-apis-abilityrunninginfo.md b/zh-cn/application-dev/reference/apis/js-apis-abilityrunninginfo.md index f58579af3f..fff64a4713 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-abilityrunninginfo.md +++ b/zh-cn/application-dev/reference/apis/js-apis-abilityrunninginfo.md @@ -6,7 +6,7 @@ Ability运行相关信息。 -# 导入模块 +## 导入模块 ```js import abilitymanager from '@ohos.application.abilityManager'; diff --git a/zh-cn/application-dev/reference/apis/js-apis-appmanager.md b/zh-cn/application-dev/reference/apis/js-apis-appmanager.md index 294b1fbdee..30551798e1 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-appmanager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-appmanager.md @@ -34,7 +34,7 @@ static isRunningInStabilityTest(callback: AsyncCallback<boolean>): void ```js import app from '@ohos.application.appManager'; app.isRunningInStabilityTest((err, flag) => { - console.log('startAbility result:' + JSON.stringfy(err)); + console.log('startAbility result:' + JSON.stringify(err)); }) ``` @@ -58,9 +58,9 @@ static isRunningInStabilityTest(): Promise<boolean> ```js import app from '@ohos.application.appManager'; app.isRunningInStabilityTest().then((flag) => { - console.log('success:' + JSON.stringfy(flag)); + console.log('success:' + JSON.stringify(flag)); }).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-audio.md b/zh-cn/application-dev/reference/apis/js-apis-audio.md index ba55cc16c3..13c9adbabc 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-audio.md +++ b/zh-cn/application-dev/reference/apis/js-apis-audio.md @@ -9,7 +9,7 @@ - [AudioManager](#audiomanager):音频管理。 - [AudioRenderer](#audiorenderer8):音频渲染,用于播放PCM(Pulse Code Modulation)音频数据。 -- [AudioCapturer](#audiocapturer8):音频采集,用于录制PCM(Pulse Code Modulation)音频数据。 +- [AudioCapturer](#audiocapturer8):音频采集,用于录制PCM音频数据。 ## 导入模块 @@ -40,7 +40,7 @@ var audioManager = audio.getAudioManager(); createAudioRenderer(options: AudioRendererOptions, callback: AsyncCallback\): void -获取音频渲染器。 +获取音频渲染器。使用callback方式异步返回结果。 **系统能力:** SystemCapability.Multimedia.Audio.Renderer @@ -102,7 +102,7 @@ createAudioRenderer(options: AudioRendererOptions): Promise | 类型 | 说明 | | ----------------------------------------- | ---------------- | -| Promise<[AudioRenderer](#audiorenderer8)> | 音频播放器对象。 | +| Promise<[AudioRenderer](#audiorenderer8)> | 音频渲染器对象。 | **示例:** @@ -226,7 +226,7 @@ var audioCapturerOptions = { } var audioCapturer; -audio.createAudioRenderer(audioCapturerOptions).then((data) => { +audio.createAudioCapturer(audioCapturerOptions).then((data) => { audioCapturer = data; console.info('AudioCapturer Created : Success : Stream Type: SUCCESS'); }).catch((err) => { @@ -1802,7 +1802,7 @@ audioManager.getAudioScene().then((value) => { **系统能力:** 以下各项对应的系统能力均为SystemCapability.Multimedia.Audio.Device -| 名称 | 参数型 | 可读 | 可写 | 说明 | +| 名称 | 类型 | 可读 | 可写 | 说明 | | ---------- | ------------------------- | ---- | ---- | ---------- | | deviceRole | [DeviceRole](#devicerole) | 是 | 否 | 设备角色。 | | deviceType | [DeviceType](#devicetype) | 是 | 否 | 设备类型。 | @@ -1845,7 +1845,7 @@ promise.then(function (value) { **系统能力:** SystemCapability.Multimedia.Audio.Renderer -| 名称 | 参数型 | 可读 | 可写 | 说明 | +| 名称 | 类型 | 可读 | 可写 | 说明 | | ----- | -------------------------- | ---- | ---- | ------------------ | | state8+ | [AudioState](#audiostate8) | 是 | 否 | 音频渲染器的状态。 | @@ -2654,7 +2654,7 @@ audioRenderer.on('stateChange', (state) => { **系统能力:** SystemCapability.Multimedia.Audio.Capturer -| 名称 | 参数型 | 可读 | 可写 | 说明 | +| 名称 | 类型 | 可读 | 可写 | 说明 | | :---- | :------------------------- | :--- | :--- | :--------------- | | state8+ | [AudioState](#audiostate8) | 是 | 否 | 音频采集器状态。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-camera.md b/zh-cn/application-dev/reference/apis/js-apis-camera.md index b2ee9f67ff..6343de2852 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-camera.md +++ b/zh-cn/application-dev/reference/apis/js-apis-camera.md @@ -1016,7 +1016,7 @@ on(type: 'error', callback: ErrorCallback): void | 名称 | 类型 | 必填 | 说明 | | :------- | :------------------------------- | :--- | :---------------------------------------------- | -| type | string | 是 | 监听事件,固定为'error',即CamerInput错误事件。 | +| type | string | 是 | 监听事件,固定为'error',即CameraInput错误事件。 | | callback | ErrorCallback | 是 | 回调函数,用于获取结果。 | **示例:** @@ -1363,7 +1363,7 @@ captureSession.addOutput(photoOutput, (err) => { addOutput\(photoOutput: PhotoOutput\): Promise -在当前会话中,添加一个PreviewOutput实例,通过Promise获取结果。 +在当前会话中,添加一个PhotoOutput实例,通过Promise获取结果。 **系统能力:** SystemCapability.Multimedia.Camera.Core diff --git a/zh-cn/application-dev/reference/apis/js-apis-media.md b/zh-cn/application-dev/reference/apis/js-apis-media.md index c04aa43286..fe5977972f 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-media.md +++ b/zh-cn/application-dev/reference/apis/js-apis-media.md @@ -578,7 +578,7 @@ let fdPath = 'fd://' let path = '/data/accounts/account_0/appdata/ohos.xxx.xxx.xxx/01.mp3'; fileIO.open(path).then(fdNumber) => { fdPath = fdPath + '' + fdNumber; - console.info('open fd sucess fd is' + fdPath); + console.info('open fd success fd is' + fdPath); }, (err) => { console.info('open fd failed err is' + err); }).catch((err) => { diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md b/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md index 998132ba0d..3df1543cf2 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md @@ -215,7 +215,7 @@ set(key: string, value: string): Promise<void> | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| key | string | 是 | 待待设置的系统属性Key。 | +| key | string | 是 | 待设置的系统属性Key。 | | value| string | 否 | 待设置的系统属性值。 | **返回值:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-uri.md b/zh-cn/application-dev/reference/apis/js-apis-uri.md index 6b2182c3af..ac6946ca66 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-uri.md +++ b/zh-cn/application-dev/reference/apis/js-apis-uri.md @@ -60,7 +60,7 @@ toString(): string **系统能力:** SystemCapability.Utils.Lang -返回适用于URL中的查询字符串。 +返回适用于URI中的查询字符串。 **返回值:** @@ -71,8 +71,8 @@ toString(): string **示例:** ```js -const url = new uri.URI('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); -url.toString() +const uri = new uri.URI('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); +uri.toString() ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-wantAgent.md b/zh-cn/application-dev/reference/apis/js-apis-wantAgent.md index 1e8ab4be2c..0e3a80bca3 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-wantAgent.md +++ b/zh-cn/application-dev/reference/apis/js-apis-wantAgent.md @@ -997,7 +997,7 @@ getOperationType(agent: WantAgent): Promise\ | 类型 | 说明 | | ----------------------------------------------------------- | ------------------------------------------------------------ | -| Promise\ | 以Promise形式返回获取optionType的结果。 | +| Promise\ | 以Promise形式返回获取operationType的结果。 | **示例**: -- GitLab