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

!5110 电源服务示例代码修改

Merge pull request !5110 from 孙悦/master
......@@ -234,7 +234,7 @@ setPowerMode(mode: DevicePowerMode, callback: AsyncCallback<void>): void
**示例:**
```js
power.setPowerMode(DevicePowerMode.MODE_PERFORMANCE, error => {
power.setPowerMode(power.DevicePowerMode.MODE_PERFORMANCE, error => {
if (typeof error === "undefined") {
console.info('set power mode to MODE_PERFORMANCE');
} else {
......@@ -271,7 +271,7 @@ setPowerMode(mode: DevicePowerMode): Promise<void>
**示例:**
```js
power.setPowerMode(DevicePowerMode.MODE_PERFORMANCE)
power.setPowerMode(power.DevicePowerMode.MODE_PERFORMANCE)
.then(() => {
console.info('set power mode to MODE_PERFORMANCE');
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册