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

!3528 【API】【settings】modify format-无需翻译

Merge pull request !3528 from 吕晓强/fix_format
...@@ -9,7 +9,7 @@ This module provides APIs for setting data items. ...@@ -9,7 +9,7 @@ This module provides APIs for setting data items.
## Modules to Import ## Modules to Import
``` ```typescript
import settings from '@ohos.settings'; import settings from '@ohos.settings';
``` ```
...@@ -34,7 +34,7 @@ Obtains the URI of a data item. ...@@ -34,7 +34,7 @@ Obtains the URI of a data item.
| string | URI of the data item.| | string | URI of the data item.|
- Example - Example
``` ```typescript
// Obtain the URI of a data item. // Obtain the URI of a data item.
let urivar = settings.getUriSync('settings.screen.brightness'); let urivar = settings.getUriSync('settings.screen.brightness');
``` ```
...@@ -61,7 +61,7 @@ Obtains the value of a data item. ...@@ -61,7 +61,7 @@ Obtains the value of a data item.
| string | Value of the data item.| | string | Value of the data item.|
- Example - Example
``` ```typescript
import featureAbility from '@ohos.featureAbility'; import featureAbility from '@ohos.featureAbility';
// Obtain the value of 'settings.screen.brightness' (this data item already exists in the database). // Obtain the value of 'settings.screen.brightness' (this data item already exists in the database).
...@@ -96,7 +96,7 @@ If the specified data item exists in the database, the **setValueSync** method u ...@@ -96,7 +96,7 @@ If the specified data item exists in the database, the **setValueSync** method u
| boolean | Result indicating whether the value is set successfully. Returns **true** if the value is set successfully; returns **false** otherwise.| | boolean | Result indicating whether the value is set successfully. Returns **true** if the value is set successfully; returns **false** otherwise.|
- Example - Example
``` ```typescript
import featureAbility from '@ohos.featureAbility'; import featureAbility from '@ohos.featureAbility';
// Update the value of 'settings.screen.brightness'. (As this data item exists in the database, the setValueSync // Update the value of 'settings.screen.brightness'. (As this data item exists in the database, the setValueSync
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
## 导入模块 ## 导入模块
``` ```typescript
import settings from '@ohos.settings'; import settings from '@ohos.settings';
``` ```
...@@ -34,7 +34,7 @@ getUriSync(name: string): string ...@@ -34,7 +34,7 @@ getUriSync(name: string): string
| string | 数据项的URI。 | | string | 数据项的URI。 |
- 示例: - 示例:
``` ```typescript
// 获取数据项的URI // 获取数据项的URI
let urivar = settings.getUriSync('settings.screen.brightness'); let urivar = settings.getUriSync('settings.screen.brightness');
``` ```
...@@ -61,7 +61,7 @@ getValueSync(dataAbilityHelper: DataAbilityHelper, name: string, defValue: strin ...@@ -61,7 +61,7 @@ getValueSync(dataAbilityHelper: DataAbilityHelper, name: string, defValue: strin
| string | 返回数据项的值。 | | string | 返回数据项的值。 |
- 示例: - 示例:
``` ```typescript
import featureAbility from '@ohos.featureAbility'; import featureAbility from '@ohos.featureAbility';
//获取数据项亮度的值(该数据项在数据库中已存在) //获取数据项亮度的值(该数据项在数据库中已存在)
...@@ -96,7 +96,7 @@ setValueSync(dataAbilityHelper: DataAbilityHelper, name: string, value: string): ...@@ -96,7 +96,7 @@ setValueSync(dataAbilityHelper: DataAbilityHelper, name: string, value: string):
| boolean | 返回设置数据项的值是否成功的结果。true表示设置成功,false则表示设置失败。 | | boolean | 返回设置数据项的值是否成功的结果。true表示设置成功,false则表示设置失败。 |
- 示例: - 示例:
``` ```typescript
import featureAbility from '@ohos.featureAbility'; import featureAbility from '@ohos.featureAbility';
//更新数据项亮度的值(该数据项在数据库中已存在,故setValueSync方法将更新该数据项的值) //更新数据项亮度的值(该数据项在数据库中已存在,故setValueSync方法将更新该数据项的值)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册