未验证 提交 068d927f 编写于 作者: O openharmony_ci 提交者: Gitee

!5719 【文档体验官】根据master更新3.1 release分支apis文件夹的拼写、准确性问题

Merge pull request !5719 from wusongqing/apis-0622-ZH
...@@ -490,7 +490,7 @@ terminateSelf(callback: AsyncCallback<void>): void ...@@ -490,7 +490,7 @@ terminateSelf(callback: AsyncCallback<void>): void
```js ```js
this.context.terminateSelf((err) => { this.context.terminateSelf((err) => {
console.log('terminateSelf result:' + JSON.stringfy(err)); console.log('terminateSelf result:' + JSON.stringify(err));
}); });
``` ```
...@@ -512,9 +512,9 @@ terminateSelf(): Promise<void> ...@@ -512,9 +512,9 @@ terminateSelf(): Promise<void>
```js ```js
this.context.terminateSelf(want).then((data) => { this.context.terminateSelf(want).then((data) => {
console.log('success:' + JSON.stringfy(data)); console.log('success:' + JSON.stringify(data));
}).catch((error) => { }).catch((error) => {
console.log('failed:' + JSON.stringfy(error)); console.log('failed:' + JSON.stringify(error));
}); });
``` ```
...@@ -717,7 +717,7 @@ var connection = 111; ...@@ -717,7 +717,7 @@ var connection = 111;
this.context.disconnectAbility(connection).then(() => { this.context.disconnectAbility(connection).then(() => {
console.log('disconnect success') console.log('disconnect success')
}).catch((err) => { }).catch((err) => {
console.log('disconnect filed') console.log('disconnect failed')
}) })
``` ```
...@@ -740,7 +740,7 @@ setMissionLabel(label: string, callback:AsyncCallback<void>): void ...@@ -740,7 +740,7 @@ setMissionLabel(label: string, callback:AsyncCallback<void>): void
```js ```js
this.context.setMissionLabel("test",(result) => { this.context.setMissionLabel("test",(result) => {
console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result)); console.log('requestPermissionsFromUserresult:' + JSON.stringify(result));
}); });
``` ```
...@@ -769,9 +769,9 @@ setMissionLabel(label: string): Promise\<void> ...@@ -769,9 +769,9 @@ setMissionLabel(label: string): Promise\<void>
```js ```js
this.context.setMissionLabel("test").then((data) => { this.context.setMissionLabel("test").then((data) => {
console.log('success:' + JSON.stringfy(data)); console.log('success:' + JSON.stringify(data));
}).catch((error) => { }).catch((error) => {
console.log('failed:' + JSON.stringfy(error)); console.log('failed:' + JSON.stringify(error));
}); });
``` ```
...@@ -794,7 +794,7 @@ requestPermissionsFromUser(permissions: Array&lt;string&gt;, requestCallback: As ...@@ -794,7 +794,7 @@ requestPermissionsFromUser(permissions: Array&lt;string&gt;, requestCallback: As
```js ```js
this.context.requestPermissionsFromUser(permissions,(result) => { this.context.requestPermissionsFromUser(permissions,(result) => {
console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result)); console.log('requestPermissionsFromUserresult:' + JSON.stringify(result));
}); });
``` ```
...@@ -823,9 +823,9 @@ requestPermissionsFromUser(permissions: Array&lt;string&gt;) : Promise&lt;Permis ...@@ -823,9 +823,9 @@ requestPermissionsFromUser(permissions: Array&lt;string&gt;) : Promise&lt;Permis
```js ```js
this.context.requestPermissionsFromUser(permissions).then((data) => { this.context.requestPermissionsFromUser(permissions).then((data) => {
console.log('success:' + JSON.stringfy(data)); console.log('success:' + JSON.stringify(data));
}).catch((error) => { }).catch((error) => {
console.log('failed:' + JSON.stringfy(error)); console.log('failed:' + JSON.stringify(error));
}); });
``` ```
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
Ability运行相关信息。 Ability运行相关信息。
# 导入模块 ## 导入模块
```js ```js
import abilitymanager from '@ohos.application.abilityManager'; import abilitymanager from '@ohos.application.abilityManager';
......
...@@ -34,7 +34,7 @@ static isRunningInStabilityTest(callback: AsyncCallback&lt;boolean&gt;): void ...@@ -34,7 +34,7 @@ static isRunningInStabilityTest(callback: AsyncCallback&lt;boolean&gt;): void
```js ```js
import app from '@ohos.application.appManager'; import app from '@ohos.application.appManager';
app.isRunningInStabilityTest((err, flag) => { 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&lt;boolean&gt; ...@@ -58,9 +58,9 @@ static isRunningInStabilityTest(): Promise&lt;boolean&gt;
```js ```js
import app from '@ohos.application.appManager'; import app from '@ohos.application.appManager';
app.isRunningInStabilityTest().then((flag) => { app.isRunningInStabilityTest().then((flag) => {
console.log('success:' + JSON.stringfy(flag)); console.log('success:' + JSON.stringify(flag));
}).catch((error) => { }).catch((error) => {
console.log('failed:' + JSON.stringfy(error)); console.log('failed:' + JSON.stringify(error));
}); });
``` ```
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
- [AudioManager](#audiomanager):音频管理。 - [AudioManager](#audiomanager):音频管理。
- [AudioRenderer](#audiorenderer8):音频渲染,用于播放PCM(Pulse Code Modulation)音频数据。 - [AudioRenderer](#audiorenderer8):音频渲染,用于播放PCM(Pulse Code Modulation)音频数据。
- [AudioCapturer](#audiocapturer8):音频采集,用于录制PCM(Pulse Code Modulation)音频数据。 - [AudioCapturer](#audiocapturer8):音频采集,用于录制PCM音频数据。
## 导入模块 ## 导入模块
...@@ -40,7 +40,7 @@ var audioManager = audio.getAudioManager(); ...@@ -40,7 +40,7 @@ var audioManager = audio.getAudioManager();
createAudioRenderer(options: AudioRendererOptions, callback: AsyncCallback\<AudioRenderer>): void createAudioRenderer(options: AudioRendererOptions, callback: AsyncCallback\<AudioRenderer>): void
获取音频渲染器。 获取音频渲染器。使用callback方式异步返回结果。
**系统能力:** SystemCapability.Multimedia.Audio.Renderer **系统能力:** SystemCapability.Multimedia.Audio.Renderer
...@@ -102,7 +102,7 @@ createAudioRenderer(options: AudioRendererOptions): Promise<AudioRenderer\> ...@@ -102,7 +102,7 @@ createAudioRenderer(options: AudioRendererOptions): Promise<AudioRenderer\>
| 类型 | 说明 | | 类型 | 说明 |
| ----------------------------------------- | ---------------- | | ----------------------------------------- | ---------------- |
| Promise<[AudioRenderer](#audiorenderer8)> | 音频播放器对象。 | | Promise<[AudioRenderer](#audiorenderer8)> | 音频渲染器对象。 |
**示例:** **示例:**
...@@ -226,7 +226,7 @@ var audioCapturerOptions = { ...@@ -226,7 +226,7 @@ var audioCapturerOptions = {
} }
var audioCapturer; var audioCapturer;
audio.createAudioRenderer(audioCapturerOptions).then((data) => { audio.createAudioCapturer(audioCapturerOptions).then((data) => {
audioCapturer = data; audioCapturer = data;
console.info('AudioCapturer Created : Success : Stream Type: SUCCESS'); console.info('AudioCapturer Created : Success : Stream Type: SUCCESS');
}).catch((err) => { }).catch((err) => {
...@@ -1810,7 +1810,7 @@ audioManager.getAudioScene().then((value) => { ...@@ -1810,7 +1810,7 @@ audioManager.getAudioScene().then((value) => {
**系统能力:** 以下各项对应的系统能力均为SystemCapability.Multimedia.Audio.Device **系统能力:** 以下各项对应的系统能力均为SystemCapability.Multimedia.Audio.Device
| 名称 | 参数型 | 可读 | 可写 | 说明 | | 名称 | 型 | 可读 | 可写 | 说明 |
| ---------- | ------------------------- | ---- | ---- | ---------- | | ---------- | ------------------------- | ---- | ---- | ---------- |
| deviceRole | [DeviceRole](#devicerole) | 是 | 否 | 设备角色。 | | deviceRole | [DeviceRole](#devicerole) | 是 | 否 | 设备角色。 |
| deviceType | [DeviceType](#devicetype) | 是 | 否 | 设备类型。 | | deviceType | [DeviceType](#devicetype) | 是 | 否 | 设备类型。 |
...@@ -1853,7 +1853,7 @@ promise.then(function (value) { ...@@ -1853,7 +1853,7 @@ promise.then(function (value) {
**系统能力:** SystemCapability.Multimedia.Audio.Renderer **系统能力:** SystemCapability.Multimedia.Audio.Renderer
| 名称 | 参数型 | 可读 | 可写 | 说明 | | 名称 | 型 | 可读 | 可写 | 说明 |
| ----- | -------------------------- | ---- | ---- | ------------------ | | ----- | -------------------------- | ---- | ---- | ------------------ |
| state<sup>8+</sup> | [AudioState](#audiostate8) | 是 | 否 | 音频渲染器的状态。 | | state<sup>8+</sup> | [AudioState](#audiostate8) | 是 | 否 | 音频渲染器的状态。 |
...@@ -2662,7 +2662,7 @@ audioRenderer.on('stateChange', (state) => { ...@@ -2662,7 +2662,7 @@ audioRenderer.on('stateChange', (state) => {
**系统能力:** SystemCapability.Multimedia.Audio.Capturer **系统能力:** SystemCapability.Multimedia.Audio.Capturer
| 名称 | 参数型 | 可读 | 可写 | 说明 | | 名称 | 型 | 可读 | 可写 | 说明 |
| :---- | :------------------------- | :--- | :--- | :--------------- | | :---- | :------------------------- | :--- | :--- | :--------------- |
| state<sup>8+</sup> | [AudioState](#audiostate8) | 是 | 否 | 音频采集器状态。 | | state<sup>8+</sup> | [AudioState](#audiostate8) | 是 | 否 | 音频采集器状态。 |
......
...@@ -1016,7 +1016,7 @@ on(type: 'error', callback: ErrorCallback<CameraInputError\>): void ...@@ -1016,7 +1016,7 @@ on(type: 'error', callback: ErrorCallback<CameraInputError\>): void
| 名称 | 类型 | 必填 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| :------- | :------------------------------- | :--- | :---------------------------------------------- | | :------- | :------------------------------- | :--- | :---------------------------------------------- |
| type | string | 是 | 监听事件,固定为'error',即CamerInput错误事件。 | | type | string | 是 | 监听事件,固定为'error',即CameraInput错误事件。 |
| callback | ErrorCallback<CameraInputError\> | 是 | 回调函数,用于获取结果。 | | callback | ErrorCallback<CameraInputError\> | 是 | 回调函数,用于获取结果。 |
**示例:** **示例:**
...@@ -1363,7 +1363,7 @@ captureSession.addOutput(photoOutput, (err) => { ...@@ -1363,7 +1363,7 @@ captureSession.addOutput(photoOutput, (err) => {
addOutput\(photoOutput: PhotoOutput\): Promise<void\> addOutput\(photoOutput: PhotoOutput\): Promise<void\>
在当前会话中,添加一个PreviewOutput实例,通过Promise获取结果。 在当前会话中,添加一个PhotoOutput实例,通过Promise获取结果。
**系统能力:** SystemCapability.Multimedia.Camera.Core **系统能力:** SystemCapability.Multimedia.Camera.Core
......
...@@ -578,7 +578,7 @@ let fdPath = 'fd://' ...@@ -578,7 +578,7 @@ let fdPath = 'fd://'
let path = '/data/accounts/account_0/appdata/ohos.xxx.xxx.xxx/01.mp3'; let path = '/data/accounts/account_0/appdata/ohos.xxx.xxx.xxx/01.mp3';
fileIO.open(path).then(fdNumber) => { fileIO.open(path).then(fdNumber) => {
fdPath = fdPath + '' + fdNumber; fdPath = fdPath + '' + fdNumber;
console.info('open fd sucess fd is' + fdPath); console.info('open fd success fd is' + fdPath);
}, (err) => { }, (err) => {
console.info('open fd failed err is' + err); console.info('open fd failed err is' + err);
}).catch((err) => { }).catch((err) => {
......
...@@ -215,7 +215,7 @@ set(key: string, value: string): Promise&lt;void&gt; ...@@ -215,7 +215,7 @@ set(key: string, value: string): Promise&lt;void&gt;
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| key | string | 是 | 待设置的系统属性Key。 | | key | string | 是 | 待设置的系统属性Key。 |
| value| string | 否 | 待设置的系统属性值。 | | value| string | 否 | 待设置的系统属性值。 |
**返回值:** **返回值:**
......
...@@ -60,7 +60,7 @@ toString(): string ...@@ -60,7 +60,7 @@ toString(): string
**系统能力:** SystemCapability.Utils.Lang **系统能力:** SystemCapability.Utils.Lang
返回适用于URL中的查询字符串。 返回适用于URI中的查询字符串。
**返回值:** **返回值:**
...@@ -71,8 +71,8 @@ toString(): string ...@@ -71,8 +71,8 @@ toString(): string
**示例:** **示例:**
```js ```js
const url = new uri.URI('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); const uri = new uri.URI('http://username:password@host:8080/directory/file?query=pppppp#qwer=da');
url.toString() uri.toString()
``` ```
......
...@@ -997,7 +997,7 @@ getOperationType(agent: WantAgent): Promise\<number> ...@@ -997,7 +997,7 @@ getOperationType(agent: WantAgent): Promise\<number>
| 类型 | 说明 | | 类型 | 说明 |
| ----------------------------------------------------------- | ------------------------------------------------------------ | | ----------------------------------------------------------- | ------------------------------------------------------------ |
| Promise\<number\> | 以Promise形式返回获取optionType的结果。 | | Promise\<number> | 以Promise形式返回获取operationType的结果。 |
**示例** **示例**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册