提交 9bd37d99 编写于 作者: Z zengyawen

update docs

Signed-off-by: Nzengyawen <zengyawen1@huawei.com>
上级 688032f2
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
import batteryInfo from '@ohos.batteryInfo'; import batteryInfo from '@ohos.batteryInfo';
``` ```
## 系统能力
SystemCapability.PowerManager.BatteryManager
## 属性 ## 属性
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
import brightness from '@ohos.brightness'; import brightness from '@ohos.brightness';
``` ```
## 系统能力
SystemCapability.PowerManager.DisplayPowerManager
## brightness.setValue ## brightness.setValue
......
...@@ -10,14 +10,9 @@ ...@@ -10,14 +10,9 @@
import power from '@ohos.power'; import power from '@ohos.power';
``` ```
## 系统能力
## 权限 SystemCapability.PowerManager.PowerManager
关机权限: ohos.permission.SHUTDOWN
重启权限: ohos.permission.REBOOT
重启并进入recovery模式的权限:ohos.permission.REBOOT_RECOVERY
## power.shutdownDevice ## power.shutdownDevice
...@@ -26,6 +21,8 @@ shutdownDevice(reason: string): void ...@@ -26,6 +21,8 @@ shutdownDevice(reason: string): void
系统关机。 系统关机。
需要权限:ohos.permission.SHUTDOWN
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -44,6 +41,8 @@ rebootDevice(reason: string): void ...@@ -44,6 +41,8 @@ rebootDevice(reason: string): void
重启设备。 重启设备。
需要权限:ohos.permission.REBOOT(重启权限)、ohos.permission.REBOOT_RECOVERY(重启并进入recovery模式的权限)
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
......
...@@ -11,9 +11,9 @@ import runninglock from '@ohos.runningLock'; ...@@ -11,9 +11,9 @@ import runninglock from '@ohos.runningLock';
``` ```
## 权限 ## 系统能力
申请、使用锁的权限:ohos.permission.RUNNING_LOCK SystemCapability.PowerManager.PowerManager
## RunningLockType ## RunningLockType
...@@ -84,6 +84,8 @@ createRunningLock(name: string, type: RunningLockType, callback: AsyncCallback&l ...@@ -84,6 +84,8 @@ createRunningLock(name: string, type: RunningLockType, callback: AsyncCallback&l
创建RunningLock锁。 创建RunningLock锁。
需要权限:ohos.permission.RUNNING_LOCK
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -113,6 +115,8 @@ createRunningLock(name: string, type: RunningLockType): Promise&lt;RunningLock&g ...@@ -113,6 +115,8 @@ createRunningLock(name: string, type: RunningLockType): Promise&lt;RunningLock&g
创建Runninglock锁。 创建Runninglock锁。
需要权限:ohos.permission.RUNNING_LOCK
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册