From fedb2c7adaa478ee5cea326de37c8aae52e380f2 Mon Sep 17 00:00:00 2001 From: wangwang Date: Thu, 18 May 2023 12:59:48 +0000 Subject: [PATCH] fix:docs error Signed-off-by: wangwang Change-Id: Id5fb636d76c6ec16603b82901ee40a6fe4694306 --- .../reference/apis/js-apis-batteryStatistics.md | 16 ++++++++-------- .../reference/apis/js-apis-brightness.md | 2 +- .../reference/apis/js-apis-power.md | 16 ++++++++-------- .../reference/apis/js-apis-runninglock.md | 12 ++++++------ .../reference/apis/js-apis-thermal.md | 6 +++--- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-batteryStatistics.md b/zh-cn/application-dev/reference/apis/js-apis-batteryStatistics.md index 5de930534f..a91de5d9d6 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-batteryStatistics.md +++ b/zh-cn/application-dev/reference/apis/js-apis-batteryStatistics.md @@ -36,7 +36,7 @@ getBatteryStats(): Promise | 错误码ID | 错误信息 | |---------|---------| -| 4600101 | 连接服务失败。 | +| 4600101 | If connecting to the service failed. | **示例:** @@ -72,7 +72,7 @@ getBatteryStats(callback: AsyncCallback): void | 错误码ID | 错误信息 | |---------|---------| -| 4600101 | 连接服务失败。 | +| 4600101 | If connecting to the service failed. | **示例:** @@ -114,7 +114,7 @@ getAppPowerValue(uid: number): number | 错误码ID | 错误信息 | |---------|---------| -| 4600101 | 连接服务失败。 | +| 4600101 | If connecting to the service failed. | **示例:** @@ -155,7 +155,7 @@ getAppPowerPercent(uid: number): number | 错误码ID | 错误信息 | |---------|---------| -| 4600101 | 连接服务失败。 | +| 4600101 | If connecting to the service failed. | **示例:** @@ -196,13 +196,13 @@ getHardwareUnitPowerValue(type: ConsumptionType): number | 错误码ID | 错误信息 | |---------|---------| -| 4600101 | 连接服务失败。 | +| 4600101 | If connecting to the service failed. | **示例:** ```js try { - var value = batteryStats.getHardwareUnitPowerValue(ConsumptionType.CONSUMPTION_TYPE_SCREEN); + var value = batteryStats.getHardwareUnitPowerValue(batteryStats.ConsumptionType.CONSUMPTION_TYPE_SCREEN); console.info('battery statistics value of hardware is: ' + value); } catch(err) { console.error('get battery statistics percent of hardware failed, err: ' + err); @@ -237,13 +237,13 @@ getHardwareUnitPowerPercent(type: ConsumptionType): number | 错误码ID | 错误信息 | |---------|---------| -| 4600101 | 连接服务失败。 | +| 4600101 | If connecting to the service failed. | **示例:** ```js try { - var percent = batteryStats.getHardwareUnitPowerPercent(ConsumptionType.CONSUMPTION_TYPE_SCREEN); + var percent = batteryStats.getHardwareUnitPowerPercent(batteryStats.ConsumptionType.CONSUMPTION_TYPE_SCREEN); console.info('battery statistics percent of hardware is: ' + percent); } catch(err) { console.error('get battery statistics percent of hardware failed, err: ' + err); diff --git a/zh-cn/application-dev/reference/apis/js-apis-brightness.md b/zh-cn/application-dev/reference/apis/js-apis-brightness.md index 0bb0f2e7a8..12556adab4 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-brightness.md +++ b/zh-cn/application-dev/reference/apis/js-apis-brightness.md @@ -36,7 +36,7 @@ setValue(value: number): void | 错误码ID | 错误信息 | |---------|---------| -| 4700101 | 连接服务失败。 | +| 4700101 | If connecting to the service failed. | **示例:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-power.md b/zh-cn/application-dev/reference/apis/js-apis-power.md index a03ed05ddd..e87ff4b9b1 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-power.md +++ b/zh-cn/application-dev/reference/apis/js-apis-power.md @@ -36,7 +36,7 @@ shutdown(reason: string): void | 错误码ID | 错误信息 | |---------|---------| -| 4900101 | 连接服务失败。 | +| 4900101 | If connecting to the service failed. | **示例:** @@ -72,7 +72,7 @@ reboot(reason: string): void | 错误码ID | 错误信息 | |---------|---------| -| 4900101 | 连接服务失败。 | +| 4900101 | If connecting to the service failed. | **示例:** @@ -98,7 +98,7 @@ isActive(): boolean | 错误码ID | 错误信息 | |---------|---------| -| 4900101 | 连接服务失败。 | +| 4900101 | If connecting to the service failed. | **示例:** @@ -133,7 +133,7 @@ wakeup(detail: string): void | 错误码ID | 错误信息 | |---------|---------| -| 4900101 | 连接服务失败。 | +| 4900101 | If connecting to the service failed. | **示例:** @@ -161,7 +161,7 @@ suspend(): void | 错误码ID | 错误信息 | |---------|---------| -| 4900101 | 连接服务失败。 | +| 4900101 | If connecting to the service failed. | **示例:** @@ -193,7 +193,7 @@ getPowerMode(): DevicePowerMode | 错误码ID | 错误信息 | |---------|---------| -| 4900101 | 连接服务失败。 | +| 4900101 | If connecting to the service failed. | **示例:** @@ -231,7 +231,7 @@ setPowerMode(mode: DevicePowerMode, callback: AsyncCallback<void>): void | 错误码ID | 错误信息 | |---------|---------| -| 4900101 | 连接服务失败。 | +| 4900101 | If connecting to the service failed. | **示例:** @@ -275,7 +275,7 @@ setPowerMode(mode: DevicePowerMode): Promise<void> | 错误码ID | 错误信息 | |---------|---------| -| 4900101 | 链接服务失败。 | +| 4900101 | If connecting to the service failed. | **示例:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-runninglock.md b/zh-cn/application-dev/reference/apis/js-apis-runninglock.md index c98c19d589..ee5e434d54 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-runninglock.md +++ b/zh-cn/application-dev/reference/apis/js-apis-runninglock.md @@ -38,7 +38,7 @@ isSupported(type: RunningLockType): boolean; | 错误码ID | 错误信息 | |---------|---------| -| 4900101 | 连接服务失败。 | +| 4900101 | If connecting to the service failed. | **示例:** @@ -75,7 +75,7 @@ create(name: string, type: RunningLockType, callback: AsyncCallback<RunningLo | 错误码ID | 错误信息 | |---------|----------| -| 4900101 | 连接服务器失败。 | +| 4900101 | If connecting to the service failed. | **示例:** @@ -118,7 +118,7 @@ create(name: string, type: RunningLockType): Promise<RunningLock> | 错误码ID | 错误信息 | |---------|----------| -| 4900101 | 连接服务器失败。 | +| 4900101 | If connecting to the service failed. | **示例:** @@ -290,7 +290,7 @@ hold(timeout: number): void | 错误码ID | 错误信息 | |---------|----------| -| 4900101 | 连接服务器失败。 | +| 4900101 | If connecting to the service failed. | **示例:** @@ -326,7 +326,7 @@ unhold(): void | 错误码ID | 错误信息 | |---------|----------| -| 4900101 | 连接服务器失败。 | +| 4900101 | If connecting to the service failed. | **示例:** @@ -366,7 +366,7 @@ isHolding(): boolean | 错误码ID | 错误信息 | |---------|---------| -| 4900101 | 连接服务失败。 | +| 4900101 | If connecting to the service failed. | **示例:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-thermal.md b/zh-cn/application-dev/reference/apis/js-apis-thermal.md index 2e2e42c503..f3e304c00c 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-thermal.md +++ b/zh-cn/application-dev/reference/apis/js-apis-thermal.md @@ -32,7 +32,7 @@ registerThermalLevelCallback(callback: Callback<ThermalLevel>): void | 错误码ID | 错误信息 | |---------|---------| -| 4800101 | 连接服务失败。 | +| 4800101 | If connecting to the service failed. | **示例:** @@ -67,7 +67,7 @@ unregisterThermalLevelCallback(callback?: Callback\): void | 错误码ID | 错误信息 | |---------|---------| -| 4800101 | 连接服务失败。 | +| 4800101 | If connecting to the service failed. | **示例:** @@ -102,7 +102,7 @@ getLevel(): ThermalLevel | 错误码ID | 错误信息 | |---------|---------| -| 4800101 | 连接服务失败。 | +| 4800101 | If connecting to the service failed. | **示例:** -- GitLab