diff --git a/zh-cn/application-dev/ability/fa-brief.md b/zh-cn/application-dev/ability/fa-brief.md index c3c89aee8ed0c0e6dcc1ef14e7e131a7358e735d..bd2836b7c66e6a8c14c64fbec2e396abc218d714 100644 --- a/zh-cn/application-dev/ability/fa-brief.md +++ b/zh-cn/application-dev/ability/fa-brief.md @@ -35,6 +35,10 @@ Ability框架在API 8及更早版本使用FA模型。FA模型中Ability分为Pag ![fa-threading-nodel](figures/fa-threading-model.png) ## 相关实例 针对Ability开发,有以下相关实例可供参考: + +- [`DistributeCalc`:分布式计算器(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/Preset/DistributeCalc) +- [`DistributeGraffti`:分布式涂鸦(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/ability/DistributedGraffiti) + - [分布式调度启动远程FA](https://gitee.com/openharmony/codelabs/tree/master/Distributed/RemoteStartFA) - [分布式新闻客户端](https://gitee.com/openharmony/codelabs/tree/master/Distributed/NewsDemo) - [分布式手写板(eTS)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/DistributeDatabaseDrawEts) diff --git a/zh-cn/application-dev/ability/fa-pageability.md b/zh-cn/application-dev/ability/fa-pageability.md index bfd1e16e42ceb6fa5656a2936d6210e44871ec42..ea5b23a0b4a21a3c18d0e8314bcccd3e518348f4 100644 --- a/zh-cn/application-dev/ability/fa-pageability.md +++ b/zh-cn/application-dev/ability/fa-pageability.md @@ -235,4 +235,4 @@ export default { ## 相关实例 针对PageAbility开发,有以下相关实例可供参考: -- [`DMS`:分布式Demo(eTS)(API7)](https://gitee.com/openharmony/app_samples/tree/master/ability/DMS) \ No newline at end of file +- [`DMS`:分布式Demo(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/ability/DMS) \ No newline at end of file diff --git a/zh-cn/application-dev/ability/fa-serviceability.md b/zh-cn/application-dev/ability/fa-serviceability.md index 4afa94f47ee503f544cdfd59e543a1473a519fe5..188a87b7f68eead3458b0a579f932b173af57d43 100644 --- a/zh-cn/application-dev/ability/fa-serviceability.md +++ b/zh-cn/application-dev/ability/fa-serviceability.md @@ -399,4 +399,4 @@ export default { 针对ServiceAbility开发,有以下相关实例可供参考: - [`ServiceAbility`:ServiceAbility的创建与使用(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/ability/ServiceAbility) -- [`DMS`:分布式Demo(eTS)(API7)](https://gitee.com/openharmony/app_samples/tree/master/ability/DMS) +- [`DMS`:分布式Demo(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/ability/DMS) diff --git a/zh-cn/application-dev/ability/stage-ability.md b/zh-cn/application-dev/ability/stage-ability.md index 34606cb00d828d324295e21b31db50b8321136e8..1237da3144c7ca5ffc05922ee4e2a80cc8399014 100644 --- a/zh-cn/application-dev/ability/stage-ability.md +++ b/zh-cn/application-dev/ability/stage-ability.md @@ -89,29 +89,29 @@ Ability类拥有context属性,context属性为AbilityContext类,AbilityConte onCreate(want, launchParam) { console.log("MainAbility onCreate") } - + onDestroy() { console.log("MainAbility onDestroy") } - + onWindowStageCreate(windowStage) { console.log("MainAbility onWindowStageCreate") - + windowStage.loadContent("pages/index").then((data) => { console.log("MainAbility load content succeed with data: " + JSON.stringify(data)) }).catch((error) => { console.error("MainAbility load content failed with error: " + JSON.stringify(error)) }) } - + onWindowStageDestroy() { console.log("MainAbility onWindowStageDestroy") } - + onForeground() { console.log("MainAbility onForeground") } - + onBackground() { console.log("MainAbility onBackground") } @@ -323,4 +323,4 @@ struct Index { ## 相关实例 针对Stage模型Ability开发,有以下相关示例可供参考: -- [`StageCallAbility`:StageAbility的创建与使用(eTS)(API9)](https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility) +- [`StageCallAbility`:StageCallAbility的创建与使用(eTS)(API9)](https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility) diff --git a/zh-cn/application-dev/ability/stage-call.md b/zh-cn/application-dev/ability/stage-call.md index 9b6018d42e17c9eb056b6d75d7d1e2aedc4d6bc3..d2b046f04617f0f0ea41e90bb298d9fbf7fc2891 100644 --- a/zh-cn/application-dev/ability/stage-call.md +++ b/zh-cn/application-dev/ability/stage-call.md @@ -248,4 +248,4 @@ try { ## 相关实例 针对Stage模型本地Call功能开发,有以下相关实例可供参考: -- [`StageCallAbility`:StageAbility的创建与使用(eTS)(API9)](https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility) +- [`StageCallAbility`:StageCallAbility的创建与使用(eTS)(API9)](https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility) diff --git a/zh-cn/application-dev/ability/stage-serviceextension.md b/zh-cn/application-dev/ability/stage-serviceextension.md index 4f8373993c89df651d6503354e7c01659198600a..dc08f94c1427592f465fb6f35ae9da9b1fe82784 100644 --- a/zh-cn/application-dev/ability/stage-serviceextension.md +++ b/zh-cn/application-dev/ability/stage-serviceextension.md @@ -79,4 +79,4 @@ ExtensionAbility,是Stage模型中新增的扩展组件的基类,一般用 ## 相关实例 针对ServiceExtensionAbility开发,有以下相关实例可供参考: -- [`ServiceExtAbility`:StageAbility的创建与使用(eTS)(API9)](https://gitee.com/openharmony/app_samples/tree/master/ability/ServiceExtAbility) +- [`ServiceExtAbility`:StageExtAbility的创建与使用(eTS)(API9)](https://gitee.com/openharmony/app_samples/tree/master/ability/ServiceExtAbility) diff --git a/zh-cn/application-dev/database/database-relational-guidelines.md b/zh-cn/application-dev/database/database-relational-guidelines.md index b2a44308880c2ab1d008b17b79f887f1d957d05a..0439bc71966f69a49f609a5b91a6c7a139fabc6e 100644 --- a/zh-cn/application-dev/database/database-relational-guidelines.md +++ b/zh-cn/application-dev/database/database-relational-guidelines.md @@ -309,4 +309,5 @@ ## 相关实例 针对关系型数据库开发,有以下相关实例可供参考: - [`Rdb`:关系型数据库(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/data/Rdb) +- [`DistributedRdb`:分布式关系型数据库(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/data/DistributedRdb) - [关系型数据库](https://gitee.com/openharmony/codelabs/tree/master/Data/JSRelationshipData) diff --git a/zh-cn/application-dev/quick-start/start-with-js.md b/zh-cn/application-dev/quick-start/start-with-js.md index a65e74890ca39259be58b85f51fdaf07e0cbd2ac..112eacc069f748fce8c4e88bcc2cb2a1207a381e 100644 --- a/zh-cn/application-dev/quick-start/start-with-js.md +++ b/zh-cn/application-dev/quick-start/start-with-js.md @@ -215,4 +215,4 @@ 恭喜您已经使用JS语言开发(传统代码方式)完成了第一个OpenHarmony应用,快来[探索更多的OpenHarmony功能](../application-dev-guide.md)吧。 ## 相关实例 针对使用JS语言(传统代码方式)开发快速入门,有以下相关实例可供参考: -- [`JsHelloWorld`:你好世界(JS)(API7)](https://gitee.com/openharmony/app_samples/tree/master/common/JsHelloWorld) +- [`JsHelloWorld`:你好世界(JS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/common/JsHelloWorld) diff --git a/zh-cn/application-dev/reference/apis/js-apis-data-ability.md b/zh-cn/application-dev/reference/apis/js-apis-data-ability.md index 48fc5c6ae62edb1b3506508233c20b6ae004c267..bd4c9f3b8282c1e912c29608225ad7e34e34a9b0 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-data-ability.md +++ b/zh-cn/application-dev/reference/apis/js-apis-data-ability.md @@ -1,6 +1,6 @@ # DataAbility 谓词 -> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** +> **说明:** > 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 @@ -19,9 +19,10 @@ createRdbPredicates(name: string, dataAbilityPredicates: DataAbilityPredicates): 从DataAabilityPredicates对象创建RdbPredicates对象。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | name | string | 是 | 数据库表中的表名。 | @@ -53,7 +54,7 @@ equalTo(field: string, value: ValueType): DataAbilityPredicates 配置谓词以匹配数据类型为ValueType且值等于指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -81,7 +82,7 @@ notEqualTo(field: string, value: ValueType): DataAbilityPredicates 配置谓词以匹配数据类型为ValueType且值不等于指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -109,7 +110,7 @@ beginWrap(): DataAbilityPredicates 向谓词添加左括号。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **返回值:** | 类型 | 说明 | @@ -136,7 +137,7 @@ endWrap(): DataAbilityPredicates 向谓词添加右括号。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **返回值:** | 类型 | 说明 | @@ -163,7 +164,7 @@ or(): DataAbilityPredicates 将或条件添加到谓词中。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **返回值:** | 类型 | 说明 | @@ -187,7 +188,7 @@ and(): DataAbilityPredicates 将和条件添加到谓词中。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **返回值:** | 类型 | 说明 | @@ -211,7 +212,7 @@ contains(field: string, value: string): DataAbilityPredicates 配置谓词以匹配数据类型为string且value包含指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -239,7 +240,7 @@ beginsWith(field: string, value: string): DataAbilityPredicates 配置谓词以匹配数据类型为string且值以指定字符串开头的字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -267,7 +268,7 @@ endsWith(field: string, value: string): DataAbilityPredicates 配置谓词以匹配数据类型为string且值以指定字符串结尾的字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -295,7 +296,7 @@ isNull(field: string): DataAbilityPredicates 配置谓词以匹配值为null的字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -322,7 +323,7 @@ isNotNull(field: string): DataAbilityPredicates 配置谓词以匹配值不为null的指定字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -349,7 +350,7 @@ like(field: string, value: string): DataAbilityPredicates 配置谓词以匹配数据类型为string且值类似于指定字符串的字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -377,7 +378,7 @@ glob(field: string, value: string): DataAbilityPredicates 配置谓词以匹配数据类型为string的指定字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -405,7 +406,7 @@ between(field: string, low: ValueType, high: ValueType): DataAbilityPredicates 配置谓词以匹配数据类型为ValueType且value在指定范围内的指定字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -434,7 +435,7 @@ notBetween(field: string, low: ValueType, high: ValueType): DataAbilityPredicate 配置谓词以匹配数据类型为ValueType且value超出给定范围的指定字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -463,7 +464,7 @@ greaterThan(field: string, value: ValueType): DataAbilityPredicates 配置谓词以匹配数据类型为ValueType且值大于指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -491,7 +492,7 @@ lessThan(field: string, value: ValueType): DataAbilityPredicates 配置谓词以匹配数据类型为valueType且value小于指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -519,7 +520,7 @@ greaterThanOrEqualTo(field: string, value: ValueType): DataAbilityPredicates 配置谓词以匹配数据类型为ValueType且value大于或等于指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -547,7 +548,7 @@ lessThanOrEqualTo(field: string, value: ValueType): DataAbilityPredicates 配置谓词以匹配数据类型为ValueType且value小于或等于指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -575,7 +576,7 @@ orderByAsc(field: string): DataAbilityPredicates 配置谓词以匹配其值按升序排序的列。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -602,7 +603,7 @@ orderByDesc(field: string): DataAbilityPredicates 配置谓词以匹配其值按降序排序的列。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -629,7 +630,7 @@ distinct(): DataAbilityPredicates 配置谓词以过滤重复记录并仅保留其中一个。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **返回值:** | 类型 | 说明 | @@ -657,7 +658,7 @@ limitAs(value: number): DataAbilityPredicates 设置最大数据记录数的谓词。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -684,7 +685,7 @@ offsetAs(rowOffset: number): DataAbilityPredicates 配置谓词以指定返回结果的起始位置。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -711,7 +712,7 @@ groupBy(fields: Array<string>): DataAbilityPredicates 配置谓词按指定列分组查询结果。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -763,7 +764,7 @@ in(field: string, value: Array<ValueType>): DataAbilityPredicates 配置谓词以匹配数据类型为ValueType数组且值在给定范围内的指定字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -792,7 +793,7 @@ notIn(field: string, value: Array<ValueType>): DataAbilityPredicates 配置谓词以匹配数据类型为ValueType数组且值不在给定范围内的指定字段。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -816,7 +817,7 @@ notIn(field: string, value: Array<ValueType>): DataAbilityPredicates 用于表示允许的数据字段类型。 -**系统能力**:SystemCapability.DistributedDataManager.DataShare.Core。 +**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。 | 名称 | 说明 | | ------- | -------------------- | diff --git a/zh-cn/application-dev/reference/apis/js-apis-data-distributedobject.md b/zh-cn/application-dev/reference/apis/js-apis-data-distributedobject.md index 2c3325a26d8bdd2b903086d616242e11467fd28d..f1979534ebd3b563660ce67508d0148af49c506b 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-data-distributedobject.md +++ b/zh-cn/application-dev/reference/apis/js-apis-data-distributedobject.md @@ -1,6 +1,6 @@ # 分布式数据对象 -> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** +> **说明:** > 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 @@ -10,8 +10,6 @@ import distributedObject from '@ohos.data.distributedDataObject'; ``` - - ## distributedDataObject.createDistributedObject createDistributedObject(source: object): DistributedObject @@ -19,7 +17,7 @@ createDistributedObject(source: object): DistributedObject 创建一个分布式对象。 -**系统能力**:SystemCapability.DistributedDataManager.DataObject.DistributedObject。 +**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -46,7 +44,7 @@ genSessionId(): string 随机创建一个sessionId。 -**系统能力**:SystemCapability.DistributedDataManager.DataObject.DistributedObject。 +**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。 **返回值:** | 类型 | 说明 | @@ -70,7 +68,7 @@ setSessionId(sessionId?: string): boolean 设置同步的sessionId,当可信组网中有多个设备时,多个设备间的对象如果设置为同一个sessionId,就能自动同步。 -**系统能力**:SystemCapability.DistributedDataManager.DataObject.DistributedObject。 +**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。 **参数:** @@ -103,7 +101,7 @@ on(type: 'change', callback: Callback<{ sessionId: string, fields: Array<stri 监听分布式对象的变更。 -**系统能力**:SystemCapability.DistributedDataManager.DataObject.DistributedObject。 +**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -132,7 +130,7 @@ off(type: 'change', callback?: Callback<{ sessionId: string, fields: Array<st 当不再进行数据变更监听时,使用此接口删除对象的变更监听。 -**系统能力**:SystemCapability.DistributedDataManager.DataObject.DistributedObject。 +**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -163,7 +161,7 @@ on(type: 'status', callback: Callback<{ sessionId: string, networkId: string, st 监听分布式对象的上下线。 -**系统能力**:SystemCapability.DistributedDataManager.DataObject.DistributedObject。 +**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -188,7 +186,7 @@ off(type: 'status', callback?: Callback<{ sessionId: string, deviceId: string, s 当不再进行对象上下线监听时,使用此接口删除对象的上下线监听。 -**系统能力**:SystemCapability.DistributedDataManager.DataObject.DistributedObject。 +**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。 **参数:** | 参数名 | 类型 | 必填 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-data-rdb.md b/zh-cn/application-dev/reference/apis/js-apis-data-rdb.md index cb4914c087972a8e0ddfb6dcc2a400dcc8ae8826..e94468b462bb443d19768d720bfb94d79e90560c 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-data-rdb.md +++ b/zh-cn/application-dev/reference/apis/js-apis-data-rdb.md @@ -1,10 +1,8 @@ # 关系型数据库 -> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** +> **说明:** > 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 - - ## 导入模块 ```js @@ -17,7 +15,7 @@ getRdbStore(config: StoreConfig, version: number, callback: AsyncCallback<Rdb 获得一个相关的RdbStore,操作关系型数据库,用户可以根据自己的需求配置RdbStore的参数,然后通过RdbStore调用相关接口可以执行相关的数据操作,结果以callback形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: @@ -44,7 +42,7 @@ getRdbStore(config: StoreConfig, version: number): Promise<RdbStore> 获得一个相关的RdbStore,操作关系型数据库,用户可以根据自己的需求配置RdbStore的参数,然后通过RdbStore调用相关接口可以执行相关的数据操作,结果以Promise形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: @@ -84,7 +82,7 @@ getRdbStore(context: Context, config: StoreConfig, version: number, callback: As 获得一个相关的RdbStore,操作关系型数据库,用户可以根据自己的需求配置RdbStore的参数,然后通过RdbStore调用相关接口可以执行相关的数据操作,结果以callback形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: @@ -113,7 +111,7 @@ getRdbStore(context: Context, config: StoreConfig, version: number): Promise< 获得一个相关的RdbStore,操作关系型数据库,用户可以根据自己的需求配置RdbStore的参数,然后通过RdbStore调用相关接口可以执行相关的数据操作,结果以Promise形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: @@ -153,7 +151,7 @@ deleteRdbStore(name: string, callback: AsyncCallback<void>): void 删除数据库,结果以callback形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -173,7 +171,7 @@ deleteRdbStore(name: string): Promise<void> 使用指定的数据库文件配置删除数据库,结果以Promise形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数** | 参数名 | 类型 | 必填 | 说明 | @@ -201,7 +199,7 @@ deleteRdbStore(context: Context, name: string, callback: AsyncCallback<void&g 删除数据库,结果以callback形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -223,7 +221,7 @@ deleteRdbStore(context: Context, name: string): Promise<void> 使用指定的数据库文件配置删除数据库,结果以Promise形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数** | 参数名 | 类型 | 必填 | 说明 | @@ -259,7 +257,7 @@ constructor(name: string) 构造函数。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -278,7 +276,7 @@ inDevices(devices: Array<string>): RdbPredicates 同步分布式数据库时指定组网内的远程设备。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -303,7 +301,7 @@ inAllDevices(): RdbPredicates 同步分布式数据库时连接到组网内的所有远程设备。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **返回值**: | 类型 | 说明 | @@ -323,7 +321,7 @@ equalTo(field: string, value: ValueType): RdbPredicates 配置谓词以匹配数据字段为ValueType且值等于指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -350,7 +348,7 @@ notEqualTo(field: string, value: ValueType): RdbPredicates 配置谓词以匹配数据字段为ValueType且值不等于指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -377,7 +375,7 @@ beginWrap(): RdbPredicates 向谓词添加左括号。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **返回值**: | 类型 | 说明 | @@ -403,7 +401,7 @@ endWrap(): RdbPredicates 向谓词添加右括号。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **返回值**: | 类型 | 说明 | @@ -429,7 +427,7 @@ or(): RdbPredicates 将或条件添加到谓词中。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **返回值**: | 类型 | 说明 | @@ -452,7 +450,7 @@ and(): RdbPredicates 向谓词添加和条件。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **返回值**: | 类型 | 说明 | @@ -474,7 +472,7 @@ contains(field: string, value: string): RdbPredicates 配置谓词以匹配数据字段为string且value包含指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -501,7 +499,7 @@ beginsWith(field: string, value: string): RdbPredicates 配置谓词以匹配数据字段为string且值以指定字符串开头的字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -528,7 +526,7 @@ endsWith(field: string, value: string): RdbPredicates 配置谓词以匹配数据字段为string且值以指定字符串结尾的字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -555,7 +553,7 @@ isNull(field: string): RdbPredicates 配置谓词以匹配值为null的字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -581,7 +579,7 @@ isNotNull(field: string): RdbPredicates 配置谓词以匹配值不为null的指定字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -607,7 +605,7 @@ like(field: string, value: string): RdbPredicates 配置谓词以匹配数据字段为string且值类似于指定字符串的字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -634,7 +632,7 @@ glob(field: string, value: string): RdbPredicates 配置RdbPredicates匹配数据字段为string的指定字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -661,7 +659,7 @@ between(field: string, low: ValueType, high: ValueType): RdbPredicates 将谓词配置为匹配数据字段为ValueType且value在给定范围内的指定字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -689,7 +687,7 @@ notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates 配置RdbPredicates以匹配数据字段为ValueType且value超出给定范围的指定字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -716,7 +714,7 @@ greaterThan(field: string, value: ValueType): RdbPredicates 配置谓词以匹配数据字段为ValueType且值大于指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -743,7 +741,7 @@ lessThan(field: string, value: ValueType): RdbPredicates 配置谓词以匹配数据字段为valueType且value小于指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -771,7 +769,7 @@ greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates 配置谓词以匹配数据字段为ValueType且value大于或等于指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -799,7 +797,7 @@ lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates 配置谓词以匹配数据字段为ValueType且value小于或等于指定值的字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -827,7 +825,7 @@ orderByAsc(field: string): RdbPredicates 配置谓词以匹配其值按升序排序的列。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -854,7 +852,7 @@ orderByDesc(field: string): RdbPredicates 配置谓词以匹配其值按降序排序的列。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -880,7 +878,7 @@ distinct(): RdbPredicates 配置谓词以过滤重复记录并仅保留其中一个。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **返回值**: | 类型 | 说明 | @@ -908,7 +906,7 @@ limitAs(value: number): RdbPredicates 设置最大数据记录数的谓词。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -934,7 +932,7 @@ offsetAs(rowOffset: number): RdbPredicates 配置RdbPredicates以指定返回结果的起始位置。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -960,7 +958,7 @@ groupBy(fields: Array<string>): RdbPredicates 配置RdbPredicates按指定列分组查询结果。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -985,7 +983,7 @@ indexedBy(field: string): RdbPredicates 配置RdbPredicates以指定索引列。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1012,7 +1010,7 @@ in(field: string, value: Array<ValueType>): RdbPredicates 配置RdbPredicates以匹配数据字段为ValueType数组且值在给定范围内的指定字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1040,7 +1038,7 @@ notIn(field: string, value: Array<ValueType>): RdbPredicates 将RdbPredicates配置为匹配数据字段为ValueType且值超出给定范围的指定字段。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1072,7 +1070,7 @@ insert(name: string, values: ValuesBucket, callback: AsyncCallback<number> 向目标表中插入一行数据,结果以callback形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1101,7 +1099,7 @@ insert(name: string, values: ValuesBucket):Promise<number> 向目标表中插入一行数据,结果以Promise形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1137,7 +1135,7 @@ update(values: ValuesBucket, rdbPredicates: RdbPredicates, callback: AsyncCallba 根据RdbPredicates的指定实例对象更新数据库中的数据,结果以callback形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1167,7 +1165,7 @@ update(values: ValuesBucket, rdbPredicates: RdbPredicates):Promise<number> 根据RdbPredicates的指定实例对象更新数据库中的数据,结果以Promise形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1206,7 +1204,7 @@ delete(rdbPredicates: RdbPredicates, callback: AsyncCallback<number>):void 根据rdbPredicates的指定实例对象从数据库中删除数据,结果以callback形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1230,7 +1228,7 @@ delete(rdbPredicates: RdbPredicates):Promise<number> 根据rdbPredicates的指定实例对象从数据库中删除数据,结果以Promise形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1261,7 +1259,7 @@ query(rdbPredicates: RdbPredicates, columns: Array<string>, callback: Asyn 根据指定条件查询数据库中的数据,结果以callback形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1287,7 +1285,7 @@ query(rdbPredicates: RdbPredicates, columns?: Array<string>):Promise<Re 根据指定条件查询数据库中的数据,结果以Promise形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1320,7 +1318,7 @@ querySql(sql: string, bindArgs: Array<ValueType>, callback: AsyncCallback& 根据指定SQL语句查询数据库中的数据,结果以callback形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1344,7 +1342,7 @@ querySql(sql: string, bindArgs?: Array<ValueType>):Promise<ResultSet> 根据指定SQL语句查询数据库中的数据,结果以Promise形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1375,7 +1373,7 @@ executeSql(sql: string, bindArgs: Array<ValueType>, callback: AsyncCallbac 执行包含指定参数但不返回值的SQL语句,结果以callbck形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1398,7 +1396,7 @@ executeSql(sql: string, bindArgs?: Array<ValueType>):Promise<void> 执行包含指定参数但不返回值的SQL语句,结果以Promise形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1427,7 +1425,7 @@ beginTransaction():void 在开始执行SQL语句之前,开始事务。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **示例**: ```js @@ -1451,7 +1449,7 @@ commit():void 提交已执行的SQL语句。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **示例**: ```js @@ -1476,7 +1474,7 @@ rollBack():void; 回滚已经执行的SQL语句。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **示例**: ```js @@ -1505,7 +1503,7 @@ setDistributedTables(tables: Array<string>, callback: AsyncCallback<voi 设置分布式列表,结果以callbck形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1531,7 +1529,7 @@ setDistributedTables(tables: Array<string>, callback: AsyncCallback<voi 设置分布式列表,结果以Promise形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1559,7 +1557,7 @@ obtainDistributedTableName(device: string, table: string, callback: AsyncCallbac 根据本地表名获取指定远程设备的分布式表名。在查询远程设备数据库时,需要使用分布式表名, 结果以callbck形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1586,7 +1584,7 @@ obtainDistributedTableName(device: string, table: string, callback: AsyncCallbac 根据本地表名获取指定远程设备的分布式表名。在查询远程设备数据库时,需要使用分布式表名,结果以Promise形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1615,7 +1613,7 @@ sync(mode: SyncMode, predicates: RdbPredicates, callback: AsyncCallback<Array 在设备之间同步数据, 结果以callbck形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1647,7 +1645,7 @@ sync(mode: SyncMode, predicates: RdbPredicates, callback: AsyncCallback<Array 在设备之间同步数据,结果以Promise形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: | 参数名 | 类型 | 必填 | 说明 | @@ -1682,7 +1680,7 @@ on(event: 'dataChange', type: SubscribeType, observer: Callback<Array<stri 注册数据库的观察者。当分布式数据库中的数据发生更改时,将调用回调。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: @@ -1712,7 +1710,7 @@ off(event:'dataChange', type: SubscribeType, observer: Callback<Array<stri 从数据库中删除指定类型的指定观察者, 结果以callbck形式返回。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数**: @@ -1741,7 +1739,7 @@ off(event:'dataChange', type: SubscribeType, observer: Callback<Array<stri 管理关系数据库配置。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。 | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | @@ -1752,7 +1750,7 @@ off(event:'dataChange', type: SubscribeType, observer: Callback<Array<stri 用于表示允许的数据字段类型。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。 | 名称 | 说明 | | -------- | -------- | @@ -1765,7 +1763,7 @@ off(event:'dataChange', type: SubscribeType, observer: Callback<Array<stri 用于存储键值对。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。 | 名称 | 参数类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | @@ -1776,7 +1774,7 @@ off(event:'dataChange', type: SubscribeType, observer: Callback<Array<stri 指数据库同步模式。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。 | 名称 | 默认值 | 说明 | | -------- | ----- |----- | @@ -1787,7 +1785,7 @@ off(event:'dataChange', type: SubscribeType, observer: Callback<Array<stri 描述订阅类型。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。 | 名称 | 默认值 | 说明 | | -------- | ----- |---- | diff --git a/zh-cn/application-dev/reference/apis/js-apis-data-resultset.md b/zh-cn/application-dev/reference/apis/js-apis-data-resultset.md index a3881d8ac890e776a097828df7825934da8bf6fb..06ec113201daf460a291115807a8200db1ee114e 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-data-resultset.md +++ b/zh-cn/application-dev/reference/apis/js-apis-data-resultset.md @@ -1,6 +1,6 @@ # 结果集 -> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** +> **说明:** > 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 @@ -25,7 +25,7 @@ promise.then((resultSet) => { ### 属性 -**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。 | 名称 | 参数类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | @@ -46,7 +46,7 @@ getColumnIndex(columnName: string): number 根据指定的列名获取列索引。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -74,7 +74,7 @@ getColumnName(columnIndex: number): string 根据指定的列索引获取列名。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -100,7 +100,7 @@ goTo(offset:number): boolean 向前或向后转至结果集的指定行,相对于其当前位置偏移。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -131,7 +131,7 @@ goToRow(position: number): boolean 转到结果集的指定行。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -163,7 +163,7 @@ goToFirstRow(): boolean 转到结果集的第一行。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **返回值:** | 类型 | 说明 | @@ -189,7 +189,7 @@ goToLastRow(): boolean 转到结果集的最后一行。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **返回值:** | 类型 | 说明 | @@ -215,7 +215,7 @@ goToNextRow(): boolean 转到结果集的下一行。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **返回值:** | 类型 | 说明 | @@ -241,7 +241,7 @@ goToPreviousRow(): boolean 转到结果集的上一行。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **返回值:** | 类型 | 说明 | @@ -267,7 +267,7 @@ getBlob(columnIndex: number): Uint8Array 以字节数组的形式获取当前行中指定列的值。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -291,7 +291,7 @@ getString(columnIndex: number): string 以字符串形式获取当前行中指定列的值。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -315,7 +315,7 @@ getLong(columnIndex: number): number 以Long形式获取当前行中指定列的值。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -339,7 +339,7 @@ getDouble(columnIndex: number): number 以double形式获取当前行中指定列的值。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -363,7 +363,7 @@ isColumnNull(columnIndex: number): boolean 检查当前行中指定列的值是否为null。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -387,7 +387,7 @@ close(): void 关闭结果集。 -**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。 **示例:** ```js diff --git a/zh-cn/application-dev/reference/apis/js-apis-data-storage.md b/zh-cn/application-dev/reference/apis/js-apis-data-storage.md index 3d3029b2bd8249afc5444352ea745d5632c4494e..ecadcebf5ed5050a3a0d5d12e314813822b2c25d 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-data-storage.md +++ b/zh-cn/application-dev/reference/apis/js-apis-data-storage.md @@ -3,7 +3,7 @@ 轻量级存储为应用提供key-value键值型的文件数据处理能力,支持应用对数据进行轻量级存储及查询。数据存储形式为键值对,键的类型为字符串型,值的存储数据类型包括数字型、字符型、布尔型。 -> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** +> **说明:** > > - 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 > @@ -18,7 +18,7 @@ import dataStorage from '@ohos.data.storage'; ## 常量 -**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.Preferences.Core | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | @@ -30,9 +30,9 @@ import dataStorage from '@ohos.data.storage'; getStorageSync(path: string): Storage -读取指定文件,将数据加载到Storage实例,用于数据操作,此方法为同步方法。 +读取指定文件,将数据加载到Storage实例,用于数据操作。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -67,9 +67,9 @@ getStorageSync(path: string): Storage getStorage(path: string, callback: AsyncCallback<Storage>): void -读取指定文件,将数据加载到Storage实例,用于数据操作,使用callback形式返回结果。 +读取指定文件,将数据加载到Storage实例,用于数据操作,使用callback方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -105,9 +105,9 @@ getStorage(path: string, callback: AsyncCallback<Storage>): void getStorage(path: string): Promise<Storage> -读取指定文件,将数据加载到Storage实例,用于数据操作,使用Promise方式作为异步方法。 +读取指定文件,将数据加载到Storage实例,用于数据操作,使用Promise方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -146,9 +146,9 @@ getStorage(path: string): Promise<Storage> deleteStorageSync(path: string): void -从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,此方法为同步方法。 +从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -165,9 +165,9 @@ deleteStorageSync(path: string): void deleteStorage(path: string, callback: AsyncCallback<void>): void -从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,使用callback方式作为异步方法。 +从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,使用callback方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -191,9 +191,9 @@ deleteStorage(path: string, callback: AsyncCallback<void>): void deleteStorage(path: string): Promise<void> -从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,使用promise方式作为异步方法。 +从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,使用promise方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -222,9 +222,7 @@ removeStorageFromCacheSync(path: string): void 从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。 -此方法为同步方法。 - -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -241,11 +239,9 @@ removeStorageFromCacheSync(path: string): void removeStorageFromCache(path: string, callback: AsyncCallback<void>): void -从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。 - -此方法为异步方法。 +从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。使用callback方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -269,11 +265,9 @@ removeStorageFromCache(path: string, callback: AsyncCallback<void>): void removeStorageFromCache(path: string): Promise<void> -从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。 - -此方法为异步方法。 +从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。使用Promise方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -307,9 +301,7 @@ getSync(key: string, defValue: ValueType): ValueType 获取键对应的值,如果值为null或者非默认值类型,返回默认数据。 -此方法为同步方法。 - -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -333,11 +325,9 @@ getSync(key: string, defValue: ValueType): ValueType get(key: string, defValue: ValueType, callback: AsyncCallback<ValueType>): void -获取键对应的值,如果值为null或者非默认值类型,返回默认数据。 - -此方法为异步方法。 +获取键对应的值,如果值为null或者非默认值类型,返回默认数据。使用callback方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -362,11 +352,9 @@ get(key: string, defValue: ValueType, callback: AsyncCallback<ValueType>): get(key: string, defValue: ValueType): Promise<ValueType> -获取键对应的值,如果值为null或者非默认值类型,返默认数据。 +获取键对应的值,如果值为null或者非默认值类型,返默认数据。使用Promise方式返回结果,此方法为异步方法。 -此方法为异步方法。 - -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** @@ -397,9 +385,7 @@ putSync(key: string, value: ValueType): void 首先获取指定文件对应的Storage实例,然后借助Storage API将数据写入Storage实例,通过flush或者flushSync将Storage实例持久化。 -此方法为同步方法。 - -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -417,11 +403,9 @@ putSync(key: string, value: ValueType): void put(key: string, value: ValueType, callback: AsyncCallback<void>): void -首先获取指定文件对应的Storage实例,然后借助Storage API将数据写入Storage实例,通过flush或者flushSync将Storage实例持久化。 - -此方法为异步方法。 +首先获取指定文件对应的Storage实例,然后借助Storage API将数据写入Storage实例,通过flush或者flushSync将Storage实例持久化。使用callback方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -446,11 +430,9 @@ put(key: string, value: ValueType, callback: AsyncCallback<void>): void put(key: string, value: ValueType): Promise<void> -首先获取指定文件对应的Storage实例,然后借助Storage API将数据写入Storage实例,通过flush或者flushSync将Storage实例持久化。 - -此方法为异步方法。 +首先获取指定文件对应的Storage实例,然后借助Storage API将数据写入Storage实例,通过flush或者flushSync将Storage实例持久化。使用Promise方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -480,9 +462,7 @@ hasSync(key: string): boolean 检查存储对象是否包含名为给定key的存储。 -此方法为同步方法。 - -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -507,11 +487,9 @@ hasSync(key: string): boolean has(key: string, callback: AsyncCallback<boolean>): boolean -检查存储对象是否包含名为给定key的存储。 - -此方法为异步方法。 +检查存储对象是否包含名为给定key的存储。使用callback方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -542,11 +520,9 @@ has(key: string, callback: AsyncCallback<boolean>): boolean has(key: string): Promise<boolean> -检查存储对象是否包含名为给定key的存储。 - -此方法为异步方法。 +检查存储对象是否包含名为给定key的存储。使用Promise方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -577,9 +553,7 @@ deleteSync(key: string): void 从存储对象中删除名为给定key的存储。 -此方法为同步方法。 - -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -592,15 +566,13 @@ deleteSync(key: string): void ``` -### deletej +### delete delete(key: string, callback: AsyncCallback<void>): void -从存储对象中删除名为给定key的存储。 - -此方法为异步方法。 +从存储对象中删除名为给定key的存储。使用callback方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -624,11 +596,9 @@ delete(key: string, callback: AsyncCallback<void>): void delete(key: string): Promise<void> -从存储对象删除名为给定key的存储。 - -此方法为异步方法。 +从存储对象删除名为给定key的存储。使用Promise方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -657,9 +627,7 @@ flushSync(): void 将当前storage对象中的修改保存到当前的storage,并同步存储到文件中。 -此方法为同步方法。 - -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **示例:** ```js @@ -671,11 +639,9 @@ flushSync(): void flush(callback: AsyncCallback<void>): void -将当前storage对象中的修改保存到当前的storage,并异步存储到文件中。 - -此方法为异步方法。 +将当前storage对象中的修改保存到当前的storage,并异步存储到文件中。使用callback方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -698,11 +664,9 @@ flush(callback: AsyncCallback<void>): void flush(): Promise<void> -将当前storage对象中的修改保存到当前的storage,并异步存储到文件中。 +将当前storage对象中的修改保存到当前的storage,并异步存储到文件中。使用Promise方式返回结果,此方法为异步方法。 -此方法为异步方法。 - -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **返回值:** | 类型 | 说明 | @@ -726,9 +690,7 @@ clearSync(): void 清除此存储对象中的所有存储。 -此方法为同步方法。 - -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **示例:** ```js @@ -740,11 +702,9 @@ clearSync(): void clear(callback: AsyncCallback<void>): void -清除此存储对象中的所有存储。 - -此方法为异步方法。 +清除此存储对象中的所有存储。使用callback方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -767,11 +727,9 @@ clear(callback: AsyncCallback<void>): void clear(): Promise<void> -清除此存储对象中的所有存储。 - -此方法为异步方法。 +清除此存储对象中的所有存储。使用Promise方式返回结果,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **返回值:** | 类型 | 说明 | @@ -795,7 +753,7 @@ on(type: 'change', callback: Callback<StorageObserver>): void 订阅数据变更者类需要实现StorageObserver接口,订阅的key的值发生变更后,在执行flush/flushSync方法后,callback方法会被回调。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 说明 | @@ -820,7 +778,7 @@ off(type: 'change', callback: Callback<StorageObserver>): void 当不再进行订阅数据变更时,使用此接口取消订阅。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** | 参数名 | 类型 | 说明 | @@ -839,7 +797,7 @@ off(type: 'change', callback: Callback<StorageObserver>): void ## StorageObserver -**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.Preferences.Core | 名称 | 参数类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | @@ -849,7 +807,7 @@ off(type: 'change', callback: Callback<StorageObserver>): void 用于表示允许的数据字段类型。 -**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core | 名称 | 说明 | | ------- | -------------------- | diff --git a/zh-cn/application-dev/reference/apis/js-apis-display.md b/zh-cn/application-dev/reference/apis/js-apis-display.md index 7ac0763a1eab1b52e65ae741a771c67f1e980106..4e6836d751ac64375ac1348206b0ee226d83a974 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-display.md +++ b/zh-cn/application-dev/reference/apis/js-apis-display.md @@ -1,6 +1,6 @@ # 屏幕属性 -> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** +> **说明:** > 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 ## 导入模块 @@ -14,7 +14,7 @@ import display from '@ohos.display'; 用于表示显示设备的状态。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。 | 名称 | 默认值 | 说明 | | -------- | -------- | -------- | @@ -31,7 +31,7 @@ import display from '@ohos.display'; 描述display对象的属性。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。 | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | @@ -56,7 +56,7 @@ getDefaultDisplay(callback: AsyncCallback<Display>): void 获取当前默认的display对象。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -82,7 +82,7 @@ getDefaultDisplay(): Promise<Display> 获取当前默认的display对象。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **返回值:** @@ -107,7 +107,7 @@ getAllDisplay(callback: AsyncCallback<Array<Display>>): void 获取当前所有的display对象。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -133,7 +133,7 @@ getAllDisplay(): Promise<Array<Display>> 获取当前所有的display对象。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **返回值:** @@ -158,7 +158,7 @@ on(type: 'add'|'remove'|'change', callback: Callback<number>): void 开启监听。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -182,7 +182,7 @@ off(type: 'add'|'remove'|'change', callback?: Callback<number>): void 关闭监听。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** | 参数名 | 类型 | 必填 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-distributed-data.md b/zh-cn/application-dev/reference/apis/js-apis-distributed-data.md index ca97f8dac20778154dcc2eb9e201d05be7cc2df4..9cddedcc8321d147111a7b9706f16da7f3386dac 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-distributed-data.md +++ b/zh-cn/application-dev/reference/apis/js-apis-distributed-data.md @@ -2,7 +2,7 @@ 分布式数据管理为应用程序提供不同设备间数据库的分布式协同能力。通过调用分布式数据各个接口,应用程序可将数据保存到分布式数据库中,并可对分布式数据库中的数据进行增/删/改/查等各项操作。 ->![](../../public_sys-resources/icon-note.gif) **说明:** +>**说明:** >本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 @@ -19,7 +19,7 @@ createKVManager(config: KVManagerConfig, callback: AsyncCallback<KVManager> 创建一个KVManager对象实例,用于管理数据库对象,并通过callback方式返回,此方法为异步方法。 -**系统能力**:SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -58,7 +58,7 @@ createKVManager(config: KVManagerConfig): Promise<KVManager> 创建一个KVManager对象实例,用于管理数据库对象,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -99,7 +99,7 @@ try { 提供KVManager实例的配置信息,包括调用方的包名和用户信息。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 | 参数名 | 参数类型 | 必填 | 说明 | | ----- | ------ | ------ | ------ | @@ -110,7 +110,7 @@ try { 用户信息。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 | 名称 | 参数类型 | 必填 | 说明 | | ----- | ------ | ------ | ------ | @@ -122,7 +122,7 @@ try { 用户类型。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 | 名称 | 默认值 | 说明 | | ----- | ------ | ------ | @@ -139,7 +139,7 @@ getKVStore<T extends KVStore>(storeId: string, options: Options, callback: 通过指定Options和storeId,创建并获取KVStore数据库,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -183,7 +183,7 @@ getKVStore<T extends KVStore>(storeId: string, options: Options): Promise& 通过指定Options和storeId,创建并获取KVStore数据库,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -230,7 +230,7 @@ closeKVStore(appId: string, storeId: string, kvStore: KVStore, callback: AsyncCa 通过storeId的值关闭指定的KVStore数据库,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -276,7 +276,7 @@ closeKVStore(appId: string, storeId: string, kvStore: KVStore): Promise<void& 通过storeId的值关闭指定的KVStore数据库,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -330,7 +330,7 @@ deleteKVStore(appId: string, storeId: string, callback: AsyncCallback<void> 通过storeId的值删除指定的KVStore数据库,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -373,7 +373,7 @@ deleteKVStore(appId: string, storeId: string): Promise<void> 通过storeId的值删除指定的KVStore数据库,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -427,7 +427,7 @@ getAllKVStoreId(appId: string, callback: AsyncCallback<string[]>): void 获取所有通过[getKVStore](#getkvstore)方法创建的且没有调用[deleteKVStore](#deletekvstore8)方法删除的KVStore数据库的storeId,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -457,7 +457,7 @@ getAllKVStoreId(appId: string): Promise<string[]> 获取所有通过[getKVStore](#getkvstore)方法创建的且没有调用[deleteKVStore](#deletekvstore8)方法删除的KVStore数据库的storeId,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -496,7 +496,7 @@ on(event: 'distributedDataServiceDie', deathCallback: Callback<void>): voi 订阅服务状态变更通知,并通过callback方式返回,此方法为同步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -505,7 +505,7 @@ on(event: 'distributedDataServiceDie', deathCallback: Callback<void>): voi | event | string | 是 | 订阅的事件名,固定为'distributedDataServiceDie',即服务状态变更事件。 | | deathCallback | Callback<void> | 是 | 回调函数,在设备状态改变时获取通知。 | -**示例** +**示例:** ```js let kvManager; @@ -528,7 +528,7 @@ off(event: 'distributedDataServiceDie', deathCallback?: Callback<void>): v 取消订阅服务状态变更通知,并通过callback方式返回,此方法为同步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -538,7 +538,7 @@ off(event: 'distributedDataServiceDie', deathCallback?: Callback<void>): v | deathCallback | Callback<void> | 否 | 回调函数,取消设备状态改变时获取通知。 | -**示例** +**示例:** ```js let kvManager; @@ -558,7 +558,7 @@ try { 用于提供创建数据库的配置信息。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 | 参数名 | 参数类型 | 必填 | 说明 | | ----- | ------ | ---- | ----------------------- | @@ -575,7 +575,7 @@ try { 用于指定创建的数据库类型。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 | 名称 | 默认值 | 说明 | | --- | ---- | ----------------------- | @@ -588,7 +588,7 @@ try { 用于指定创建的数据库的安全级别。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 | 名称 | 默认值 | 说明 | | --- | ---- | ----------------------- | @@ -604,7 +604,7 @@ try { KVStore常量。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 | 名称 | 默认值 | 说明 | | --- | ---- | ----------------------- | @@ -619,7 +619,7 @@ KVStore常量。 表示数据库模式,可以在创建或打开数据库时创建 Schema 对象并将它们放入 Options 中。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 | 名称 | 类型 | 说明 | | --- | ---- | ----------------------- | @@ -634,13 +634,13 @@ constructor() 用于创建Schema实例的构造函数。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 ## FieldNode8+ ## 表示 Schema 实例的节点,提供定义存储在数据库中的值的方法。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 | 名称 | 类型 | 说明 | | --- | ---- | ----------------------- | @@ -654,7 +654,7 @@ constructor(name: string) 用于创建带有string字段FieldNode实例的构造函数。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -668,7 +668,7 @@ appendChild(child: FieldNode): boolean 向这个 FieldNode 添加一个子节点。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -682,7 +682,7 @@ appendChild(child: FieldNode): boolean | ------------- | -------------- | | boolean |如果子节点成功添加到这个FieldNode,则返回 true;否则返回 false。 | -**示例** +**示例:** ```js import ddm from '@ohos.data.distributedData'; @@ -716,7 +716,7 @@ getCount(): number 获取结果集中的行数。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -724,7 +724,7 @@ getCount(): number | ------ | -------------- | | number |返回行数。 | -**示例** +**示例:** ```js let kvStore; @@ -749,7 +749,7 @@ getPosition(): number 获取结果集中当前的读取位置。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -757,7 +757,7 @@ getPosition(): number | ------ | -------------- | | number |返回当前读取位置。 | -**示例** +**示例:** ```js let kvStore; @@ -783,7 +783,7 @@ moveToFirst(): boolean 将读取位置移动到第一行。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -791,7 +791,7 @@ moveToFirst(): boolean | ------ | -------------- | | boolean |如果操作成功则返回true,否则返回 false。 | -**示例** +**示例:** ```js let kvStore; @@ -817,7 +817,7 @@ moveToLast(): boolean 将读取位置移动到最后一行。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -825,7 +825,7 @@ moveToLast(): boolean | ------ | -------------- | | boolean |如果操作成功则返回true,否则返回 false。 | -**示例** +**示例:** ```js let kvStore; @@ -851,7 +851,7 @@ moveToNext(): boolean 将读取位置移动到下一行。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -859,7 +859,7 @@ moveToNext(): boolean | ------ | -------------- | | boolean |如果操作成功则返回true,否则返回 false。 | -**示例** +**示例:** ```js let kvStore; @@ -885,7 +885,7 @@ moveToPrevious(): boolean 将读取位置移动到上一行。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -893,7 +893,7 @@ moveToPrevious(): boolean | ------ | -------------- | | boolean |如果操作成功则返回true,否则返回 false。 | -**示例** +**示例:** ```js let kvStore; @@ -919,7 +919,7 @@ move(offset: number): boolean 将读取位置移动到当前位置的相对偏移量。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -933,7 +933,7 @@ move(offset: number): boolean | ------ | -------------- | | boolean |如果操作成功则返回true,否则返回 false。 | -**示例** +**示例:** ```js let kvStore; @@ -959,7 +959,7 @@ moveToPosition(position: number): boolean 将读取位置从 0 移动到绝对位置。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -973,7 +973,7 @@ moveToPosition(position: number): boolean | ------ | -------------- | | boolean |如果操作成功则返回true,否则返回 false。 | -**示例** +**示例:** ```js let kvStore; @@ -999,7 +999,7 @@ isFirst(): boolean 检查读取位置是否为第一行。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -1007,7 +1007,7 @@ isFirst(): boolean | ------ | -------------- | | boolean |如果读取位置是第一行,则返回 true;否则返回 false。 | -**示例** +**示例:** ```js let kvStore; @@ -1033,7 +1033,7 @@ isLast(): boolean 检查读取位置是否为最后一行。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -1041,7 +1041,7 @@ isLast(): boolean | ------ | -------------- | | boolean |如果读取位置是最后一行,则返回 true;否则返回 false。 | -**示例** +**示例:** ```js let kvStore; @@ -1066,7 +1066,7 @@ isBeforeFirst(): boolean 检查读取位置是否在第一行之前。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -1074,7 +1074,7 @@ isBeforeFirst(): boolean | ------ | -------------- | | boolean |如果读取位置在第一行之前,则返回 true;否则返回 false。 | -**示例** +**示例:** ```js let kvStore; @@ -1100,7 +1100,7 @@ isAfterLast(): boolean 检查读取位置是否在最后一行之后。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -1108,7 +1108,7 @@ isAfterLast(): boolean | ------ | -------------- | | boolean |如果读取位置在最后一行之后,则返回 true;否则返回 false。 | -**示例** +**示例:** ```js let kvStore; @@ -1134,7 +1134,7 @@ getEntry(): Entry 获取键值对。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -1142,7 +1142,7 @@ getEntry(): Entry | ------ | ------- | | [Entry](#entry) |返回键值对。| -**示例** +**示例:** ```js let kvStore; @@ -1167,7 +1167,7 @@ try { 使用谓词表示数据库查询,提供创建Query实例、查询数据库中的数据和添加谓词的方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 ### constructor8+ ### @@ -1175,7 +1175,7 @@ constructor() 用于创建Schema实例的构造函数。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 ### reset8+ ### @@ -1184,7 +1184,7 @@ reset(): Query 公共查询重置。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -1193,7 +1193,7 @@ reset(): Query | ------ | ------- | | [Query](#query8) |返回重置的 Query 对象。| -**示例** +**示例:** ```js try { @@ -1215,7 +1215,7 @@ equalTo(field: string, value: number|string|boolean): Query 构造一个Query对象来查询具有指定字段的条目,其值等于指定的值。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1230,7 +1230,7 @@ equalTo(field: string, value: number|string|boolean): Query | ------ | ------- | | [Query](#query8) |返回重置的 Query 对象。| -**示例** +**示例:** ```js try { @@ -1250,7 +1250,7 @@ notEqualTo(field: string, value: number|string|boolean): Query 构造一个Query对象以查询具有指定字段且值不等于指定值的条目。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1265,7 +1265,7 @@ notEqualTo(field: string, value: number|string|boolean): Query | ------ | ------- | | [Query](#query8) |返回重置的 Query 对象。| -**示例** +**示例:** ```js try { @@ -1285,7 +1285,7 @@ greaterThan(field: string, value: number|string|boolean): Query 构造一个Query对象以查询具有大于指定值的指定字段的条目。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1300,7 +1300,7 @@ greaterThan(field: string, value: number|string|boolean): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1320,7 +1320,7 @@ lessThan(field: string, value: number|string): Query 构造一个Query对象以查询具有小于指定值的指定字段的条目。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1335,7 +1335,7 @@ lessThan(field: string, value: number|string): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1355,7 +1355,7 @@ greaterThanOrEqualTo(field: string, value: number|string): Query 构造一个Query对象以查询具有指定字段且值大于或等于指定值的条目。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1370,7 +1370,7 @@ greaterThanOrEqualTo(field: string, value: number|string): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1390,7 +1390,7 @@ lessThanOrEqualTo(field: string, value: number|string): Query 构造一个Query对象以查询具有指定字段且值小于或等于指定值的条目。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1405,7 +1405,7 @@ lessThanOrEqualTo(field: string, value: number|string): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1426,7 +1426,7 @@ isNull(field: string): Query 构造一个Query对象以查询具有值为null的指定字段的条目。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1440,7 +1440,7 @@ isNull(field: string): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1461,7 +1461,7 @@ inNumber(field: string, valueList: number[]): Query 构造一个Query对象以查询具有指定字段的条目,其值在指定的值列表中。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1476,7 +1476,7 @@ inNumber(field: string, valueList: number[]): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1496,7 +1496,7 @@ inString(field: string, valueList: string[]): Query 构造一个Query对象以查询具有指定字段的条目,其值在指定的字符串值列表中。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1511,7 +1511,7 @@ inString(field: string, valueList: string[]): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1531,7 +1531,7 @@ notInNumber(field: string, valueList: number[]): Query 构造一个Query对象以查询具有指定字段的条目,该字段的值不在指定的值列表中。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1546,7 +1546,7 @@ notInNumber(field: string, valueList: number[]): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1566,7 +1566,7 @@ notInString(field: string, valueList: string[]): Query 构造一个Query对象以查询具有指定字段且值不在指定字符串值列表中的条目。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1581,7 +1581,7 @@ notInString(field: string, valueList: string[]): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1601,7 +1601,7 @@ like(field: string, value: string): Query 构造一个Query对象以查询具有与指定字符串值相似的指定字段的条目。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1616,7 +1616,7 @@ like(field: string, value: string): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1636,7 +1636,7 @@ unlike(field: string, value: string): Query 构造一个Query对象以查询具有与指定字符串值不相似的指定字段的条目。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1651,7 +1651,7 @@ unlike(field: string, value: string): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1671,7 +1671,7 @@ and(): Query 构造一个带有与条件的查询对象。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -1679,7 +1679,7 @@ and(): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1701,7 +1701,7 @@ or(): Query 构造一个带有或条件的Query对象。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -1709,7 +1709,7 @@ or(): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1731,7 +1731,7 @@ orderByAsc(field: string): Query 构造一个Query对象,将查询结果按升序排序。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1745,7 +1745,7 @@ orderByAsc(field: string): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1766,7 +1766,7 @@ orderByDesc(field: string): Query 构造一个Query对象,将查询结果按降序排序。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1780,7 +1780,7 @@ orderByDesc(field: string): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1801,7 +1801,7 @@ limit(total: number, offset: number): Query 构造一个Query对象来指定结果的数量和开始位置。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1816,7 +1816,7 @@ limit(total: number, offset: number): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1837,7 +1837,7 @@ isNotNull(field: string): Query 使用不为空的指定字段创建查询条件。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1851,7 +1851,7 @@ isNotNull(field: string): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1871,7 +1871,7 @@ beginGroup(): Query 创建一个带有左括号的查询条件组。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -1879,7 +1879,7 @@ beginGroup(): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1901,7 +1901,7 @@ endGroup(): Query 创建一个带有右括号的查询条件组。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -1909,7 +1909,7 @@ endGroup(): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1931,7 +1931,7 @@ prefixKey(prefix: string): Query 创建具有指定键前缀的查询条件。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1945,7 +1945,7 @@ prefixKey(prefix: string): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -1966,7 +1966,7 @@ setSuggestIndex(index: string): Query 设置一个指定的索引,将优先用于查询。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -1980,7 +1980,7 @@ setSuggestIndex(index: string): Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -2001,7 +2001,7 @@ deviceId(deviceId:string):Query 添加设备ID作为key的前缀。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2016,7 +2016,7 @@ deviceId(deviceId:string):Query | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -2035,7 +2035,7 @@ getSqlLike():string 获取指定Query对象的查询语句。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -2043,7 +2043,7 @@ getSqlLike():string | ------ | ------- | | [Query](#query8) |返回查询对象。| -**示例** +**示例:** ```js try { @@ -2060,7 +2060,7 @@ try { KVStore数据库实例,提供增加数据、删除数据和订阅数据变更、订阅同步完成的方法。在调用KVStore的方法前,需要先通过getKVStore构建一个KVStore实例。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 ### put @@ -2068,7 +2068,7 @@ put(key: string, value: Uint8Array | string | number | boolean, callback: AsyncC 添加指定类型键值对到数据库,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2078,7 +2078,7 @@ put(key: string, value: Uint8Array | string | number | boolean, callback: AsyncC | value | Uint8Array \| string \| number \| boolean | 是 |要添加数据的value,支持Uint8Array、number 、 string 、boolean,Uint8Array、string 的长度不大于[MAX_VALUE_LENGTH](#constants)。 | | callback | AsyncCallback<void> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -2104,7 +2104,7 @@ put(key: string, value: Uint8Array | string | number | boolean): Promise<void 添加指定类型键值对到数据库,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2119,7 +2119,7 @@ put(key: string, value: Uint8Array | string | number | boolean): Promise<void | ------ | ------- | | Promise<void> |Promise实例,用于异步处理。| -**示例** +**示例:** ```js let kvStore; @@ -2143,7 +2143,7 @@ delete(key: string, callback: AsyncCallback<void>): void 从数据库中删除指定键值的数据,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2152,7 +2152,7 @@ delete(key: string, callback: AsyncCallback<void>): void | key | string | 是 |要删除数据的key,不能为空且长度不大于[MAX_KEY_LENGTH](#constants)。 | | callback | AsyncCallback<void> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -2185,7 +2185,7 @@ delete(key: string): Promise<void> 从数据库中删除指定键值的数据,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2199,7 +2199,7 @@ delete(key: string): Promise<void> | ------ | ------- | | Promise<void> |Promise实例,用于异步处理。| -**示例** +**示例:** ```js let kvStore; @@ -2228,7 +2228,7 @@ on(event: 'dataChange', type: SubscribeType, observer: Callback<ChangeNotific 订阅指定类型的数据变更通知,此方法为同步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2238,7 +2238,7 @@ on(event: 'dataChange', type: SubscribeType, observer: Callback<ChangeNotific | type |[SubscribeType](#subscribetype) | 是 |表示订阅的类型。 | | observer |Callback<[ChangeNotification](#changenotification)> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -2254,7 +2254,7 @@ on(event: 'syncComplete', syncCallback: Callback<Array<[string, number]> 订阅同步完成事件回调通知,此方法为同步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2263,7 +2263,7 @@ on(event: 'syncComplete', syncCallback: Callback<Array<[string, number]> | event |string | 是 |订阅的事件名,固定为'syncComplete',表示同步完成事件。 | | syncCallback |Callback<Array<[string, number]>> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -2278,7 +2278,7 @@ off(event:'dataChange', observer?: Callback<ChangeNotification>): void 取消订阅数据变更通知,此方法为同步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2287,7 +2287,7 @@ off(event:'dataChange', observer?: Callback<ChangeNotification>): void | event |string | 是 |取消订阅的事件名,固定为'dataChange',表示数据变更事件。 | | observer |Callback<[ChangeNotification](#changenotification)> |否 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -2306,7 +2306,7 @@ putBatch(entries: Entry[], callback: AsyncCallback<void>): void 批量插入键值对到KVStore数据库中,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2315,7 +2315,7 @@ putBatch(entries: Entry[], callback: AsyncCallback<void>): void | entries |[Entry](#entry)[] | 是 |表示要批量插入的键值对。 | | callback |Asyncallback<void> |是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -2353,7 +2353,7 @@ putBatch(entries: Entry[]): Promise<void> 批量插入键值对到KVStore数据库中,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2367,7 +2367,7 @@ putBatch(entries: Entry[]): Promise<void> | ------ | ------- | | Promise<void> |Promise实例,用于异步处理。| -**示例** +**示例:** ```js let kvStore; @@ -2408,7 +2408,7 @@ deleteBatch(keys: string[], callback: AsyncCallback<void>): void 批量删除KVStore数据库中的键值对,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2417,7 +2417,7 @@ deleteBatch(keys: string[], callback: AsyncCallback<void>): void | keys |string[] | 是 |表示要批量删除的键值对。 | | callback |AsyncCallback<void> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -2455,7 +2455,7 @@ deleteBatch(keys: string[]): Promise<void> 批量删除KVStore数据库中的键值对,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2469,7 +2469,7 @@ deleteBatch(keys: string[]): Promise<void> | ------ | ------- | | Promise<void> |Promise实例,用于异步处理。| -**示例** +**示例:** ```js let kvStore; @@ -2511,7 +2511,7 @@ startTransaction(callback: AsyncCallback<void>): void 启动KVStore数据库中的事务,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2519,7 +2519,7 @@ startTransaction(callback: AsyncCallback<void>): void | ----- | ------ | ---- | ----------------------- | | callback |AsyncCallback<void> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -2563,7 +2563,7 @@ startTransaction(): Promise<void> 启动KVStore数据库中的事务,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -2571,7 +2571,7 @@ startTransaction(): Promise<void> | ------ | ------- | | Promise<void> |Promise实例,用于异步处理。| -**示例** +**示例:** ```js let kvStore; @@ -2598,7 +2598,7 @@ commit(callback: AsyncCallback<void>): void 提交KVStore数据库中的事务,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2606,7 +2606,7 @@ commit(callback: AsyncCallback<void>): void | ----- | ------ | ---- | ----------------------- | | callback |AsyncCallback<void> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -2630,7 +2630,7 @@ commit(): Promise<void> 提交KVStore数据库中的事务,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -2638,7 +2638,7 @@ commit(): Promise<void> | ------ | ------- | | Promise<void> |Promise实例,用于异步处理。| -**示例** +**示例:** ```js let kvStore; @@ -2660,7 +2660,7 @@ rollback(callback: AsyncCallback<void>): void 在KVStore数据库中回滚事务,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2668,7 +2668,7 @@ rollback(callback: AsyncCallback<void>): void | ----- | ------ | ---- | ----------------------- | | callback |AsyncCallback<void> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -2692,7 +2692,7 @@ rollback(): Promise<void> 在KVStore数据库中回滚事务,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -2700,7 +2700,7 @@ rollback(): Promise<void> | ------ | ------- | | Promise<void> |Promise实例,用于异步处理。| -**示例** +**示例:** ```js let kvStore; @@ -2722,7 +2722,7 @@ enableSync(enabled: boolean, callback: AsyncCallback<void>): void 设定是否开启同步,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2731,7 +2731,7 @@ enableSync(enabled: boolean, callback: AsyncCallback<void>): void | enabled |boolean | 是 |指定是否开启同步,ture表示开启同步,false表示不启用同步。 | | callback |AsyncCallback<void> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -2755,7 +2755,7 @@ enableSync(enabled: boolean): Promise<void> 设定是否开启同步,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2769,7 +2769,7 @@ enableSync(enabled: boolean): Promise<void> | ------ | ------- | | Promise<void> |Promise实例,用于异步处理。| -**示例** +**示例:** ```js let kvStore; @@ -2791,7 +2791,7 @@ setSyncRange(localLabels: string[], remoteSupportLabels: string[], callback: Asy 设置同步范围标签,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2801,7 +2801,7 @@ setSyncRange(localLabels: string[], remoteSupportLabels: string[], callback: Asy | remoteSupportLabels |string[] | 是 |表示要同步数据的设备的同步标签。 | | callback |AsyncCallback<void> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -2823,7 +2823,7 @@ setSyncRange(localLabels: string[], remoteSupportLabels: string[]): Promise<v 设置同步范围标签,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2839,7 +2839,7 @@ setSyncRange(localLabels: string[], remoteSupportLabels: string[]): Promise<v | ------ | ------- | | Promise<void> |Promise实例,用于异步处理。| -**示例** +**示例:** ```js let kvStore; @@ -2861,7 +2861,7 @@ try { 描述订阅类型。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 | 名称 | 默认值 | 说明 | | ----- | ------ | ----------------------- | @@ -2873,7 +2873,7 @@ try { 数据变更时通知的对象,包括数据插入的数据、更新的数据、删除的数据和设备ID。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 | 名称 | 参数类型 |可读 |可写 | 说明 | | ----- | ------- | -----| ------|------------------------ | @@ -2886,7 +2886,7 @@ try { 存储在数据库中的键值对。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 | 名称 | 参数类型 |可读 |可写 | 说明 | | ----- | ------- | -----| ------|------------------------ | @@ -2898,7 +2898,7 @@ try { 存储在数据库中的对象。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 | 名称 | 参数类型 |可读 |可写 | 说明 | | ----- | ------- | -----| ------|------------------------ | @@ -2911,7 +2911,7 @@ try { 只能被内部应用使用。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。 | 名称 | 默认值 | 说明 | | ----- | ------ | ----------------------- | @@ -2926,7 +2926,7 @@ try { 单版本分布式数据库,继承自KVStore,提供查询数据和同步数据的方法。在调用 SingleKVStore 的方法前,需要先通过 [getKVStore](#getkvstore) 构建一个 SingleKVStore 实例。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 ### get @@ -2934,7 +2934,7 @@ get(key: string, callback: AsyncCallback<Uint8Array | string | boolean | numb 获取指定键的值,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2943,7 +2943,7 @@ get(key: string, callback: AsyncCallback<Uint8Array | string | boolean | numb | key |string | 是 |要查询数据的key,不能为空且长度不大于[MAX_KEY_LENGTH](#constants)。 | | callback |AsyncCallback<Uint8Array \| string \| boolean \| number>) | 是 |回调函数,获取查询的值。 | -**示例** +**示例:** ```js let kvStore; @@ -2972,7 +2972,7 @@ get(key: string): Promise<Uint8Array | string | boolean | number> 获取指定键的值,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -2987,7 +2987,7 @@ get(key: string): Promise<Uint8Array | string | boolean | number> | ------ | ------- | |Promise<Uint8Array \| string \| boolean \| number> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -3015,7 +3015,7 @@ getEntries(keyPrefix: string, callback: AsyncCallback<Entry[]>): void 获取匹配指定键前缀的所有键值对,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3024,7 +3024,7 @@ getEntries(keyPrefix: string, callback: AsyncCallback<Entry[]>): void | keyPrefix |string | 是 |表示要匹配的键前缀。 | | callback |AsyncCallback<[Entry](#entry)[]> | 是 |回调函数,获取指定前缀的键值对列表。 | -**示例** +**示例:** ```js let kvStore; @@ -3061,7 +3061,7 @@ getEntries(keyPrefix: string): Promise<Entry[]> 获取匹配指定键前缀的所有键值对,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3075,7 +3075,7 @@ getEntries(keyPrefix: string): Promise<Entry[]> | ------ | ------- | |Promise<[Entry](#entry)[]> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -3119,7 +3119,7 @@ getEntries(query: Query, callback: AsyncCallback<Entry[]>): void 获取与指定 Query 对象匹配的键值对列表,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3128,7 +3128,7 @@ getEntries(query: Query, callback: AsyncCallback<Entry[]>): void | query |[Query](#query8) | 是 |表示要匹配的键前缀。 | | callback |AsyncCallback<[Entry](#entry)[]> | 是 |回调函数,获取指定前缀的键值对列表。 | -**示例** +**示例:** ```js let kvStore; @@ -3170,7 +3170,7 @@ getEntries(query: Query): Promise<Entry[]> 获取匹配指定键前缀的所有键值对,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core **参数:** @@ -3184,7 +3184,7 @@ getEntries(query: Query): Promise<Entry[]> | ------ | ------- | |Promise<[Entry](#entry)[]> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js try { @@ -3227,7 +3227,7 @@ getResultSet(keyPrefix: string, callback: AsyncCallback<KvStoreResultSet>) 从 KvStore 数据库中获取具有指定前缀的结果集,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3236,7 +3236,7 @@ getResultSet(keyPrefix: string, callback: AsyncCallback<KvStoreResultSet>) | keyPrefix |string | 是 |表示要匹配的键前缀。 | | callback |AsyncCallback<[KvStoreResultSet](#kvstoreresultset8)> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -3276,7 +3276,7 @@ getResultSet(keyPrefix: string): Promise<KvStoreResultSet> 从 KVStore 数据库中获取具有指定前缀的结果集,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3290,7 +3290,7 @@ getResultSet(keyPrefix: string): Promise<KvStoreResultSet> | ------ | ------- | |Promise<[KvStoreResultSet](#kvstoreresultset8)> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -3336,7 +3336,7 @@ getResultSet(query: Query, callback: AsyncCallback<KvStoreResultSet>): voi 获取与指定 Query 对象匹配的 KvStoreResultSet 对象,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3345,7 +3345,7 @@ getResultSet(query: Query, callback: AsyncCallback<KvStoreResultSet>): voi | query |Query | 是 |表示查询对象。 | | callback |AsyncCallback<[KvStoreResultSet](#kvstoreresultset8)> | 是 |回调函数,获取与指定 Query 对象匹配的 KvStoreResultSet 对象。 | -**示例** +**示例:** ```js let kvStore; @@ -3384,7 +3384,7 @@ getResultSet(query: Query): Promise<KvStoreResultSet> 获取与指定 Query 对象匹配的 KvStoreResultSet 对象,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3398,7 +3398,7 @@ getResultSet(query: Query): Promise<KvStoreResultSet> | ------ | ------- | |Promise<[KvStoreResultSet](#kvstoreresultset8)> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -3440,7 +3440,7 @@ closeResultSet(resultSet: KvStoreResultSet, callback: AsyncCallback<void>) 关闭由 getResultSet 返回的 KvStoreResultSet 对象,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3449,7 +3449,7 @@ closeResultSet(resultSet: KvStoreResultSet, callback: AsyncCallback<void>) | resultSet |[KvStoreResultSet](#kvstoreresultset8) | 是 |表示要关闭的 KvStoreResultSet 对象。 | | callback |AsyncCallback<void> | 是 |回调函数,获取由 getResultSet 返回的 KvStoreResultSet 对象。 | -**示例** +**示例:** ```js let kvStore; @@ -3474,7 +3474,7 @@ closeResultSet(resultSet: KvStoreResultSet): Promise<void> 关闭由 getResultSet 返回的 KvStoreResultSet 对象,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3488,7 +3488,7 @@ closeResultSet(resultSet: KvStoreResultSet): Promise<void> | ------ | ------- | |Promise<void> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -3511,7 +3511,7 @@ getResultSize(query: Query, callback: AsyncCallback<number>): void 获取与指定 Query 对象匹配的结果数,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3520,7 +3520,7 @@ getResultSize(query: Query, callback: AsyncCallback<number>): void | query |[Query](#query8) | 是 |表示查询对象。 | | callback |AsyncCallback<number> | 是 |回调函数,获取与指定 Query 对象匹配的结果数。 | -**示例** +**示例:** ```js let kvStore; @@ -3557,7 +3557,7 @@ getResultSize(query: Query): Promise<number> 获取与指定 Query 对象匹配的结果数,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3571,7 +3571,7 @@ getResultSize(query: Query): Promise<number> | ------ | ------- | |Promise<number> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -3612,7 +3612,7 @@ removeDeviceData(deviceId: string, callback: AsyncCallback<void>): void 删除指定设备的数据,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3621,7 +3621,7 @@ removeDeviceData(deviceId: string, callback: AsyncCallback<void>): void | deviceId |string | 是 |表示要删除设备的名称。 | | callback |AsyncCallback<void> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -3654,7 +3654,7 @@ removeDeviceData(deviceId: string): Promise<void> 删除指定设备的数据,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3668,7 +3668,7 @@ removeDeviceData(deviceId: string): Promise<void> | ------ | ------- | |Promise<void> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -3703,7 +3703,7 @@ on(event: 'syncComplete', syncCallback: Callback<Array<[string, number]> 订阅同步完成事件回调通知,此方法为同步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3712,7 +3712,7 @@ on(event: 'syncComplete', syncCallback: Callback<Array<[string, number]> | event |string | 是 |订阅的事件名,固定为'syncComplete',表示同步完成事件。 | | syncCallback |Callback<Array<[string, number]>> | 是 |用于向调用方发送同步结果的回调。 | -**示例** +**示例:** ```js let kvStore; @@ -3739,7 +3739,7 @@ off(event: 'syncComplete', syncCallback?: Callback<Array<[string, number]& 取消订阅同步完成事件回调通知,此方法为同步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3748,7 +3748,7 @@ off(event: 'syncComplete', syncCallback?: Callback<Array<[string, number]& | event |string | 是 |取消订阅的事件名,固定为'syncComplete',表示同步完成事件。 | | syncCallback |Callback<Array<[string, number]>> | 否 |用于向调用方发送同步结果的回调。 | -**示例** +**示例:** ```js let kvStore; @@ -3772,7 +3772,7 @@ sync(deviceIdList: string[], mode: SyncMode, allowedDelayMs?: number): void **需要权限**: ohos.permission.DISTRIBUTED_DATASYNC。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3795,7 +3795,7 @@ setSyncParam(defaultAllowedDelayMs: number, callback: AsyncCallback<void>) 设置允许数据库同步的默认延迟,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3804,7 +3804,7 @@ setSyncParam(defaultAllowedDelayMs: number, callback: AsyncCallback<void>) | defaultAllowedDelayMs |number | 是 |表示数据库同步允许的默认延迟,以毫秒为单位。 | | callback |AsyncCallback<void> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -3825,7 +3825,7 @@ setSyncParam(defaultAllowedDelayMs: number): Promise<void> 设置允许数据库同步的默认延迟,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3840,7 +3840,7 @@ setSyncParam(defaultAllowedDelayMs: number): Promise<void> | ------ | ------- | |Promise<void> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -3863,7 +3863,7 @@ getSecurityLevel(callback: AsyncCallback<SecurityLevel>): void 获取数据库的安全级别,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -3871,7 +3871,7 @@ getSecurityLevel(callback: AsyncCallback<SecurityLevel>): void | ----- | ------ | ---- | ----------------------- | | callback |AsyncCallback<[SecurityLevel](#securitylevel)> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -3891,7 +3891,7 @@ getSecurityLevel(): Promise<SecurityLevel> 获取数据库的安全级别,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **返回值:** @@ -3899,7 +3899,7 @@ getSecurityLevel(): Promise<SecurityLevel> | ------ | ------- | |Promise<[SecurityLevel](#securitylevel)> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -3919,7 +3919,7 @@ try { 在分布式系统中按设备管理分布式数据,继承自KVStore,提供查询数据和同步数据的方法。在调用DeviceKVStore的方法前,需要先通过[getKVStore](#getkvstore)构建一个DeviceKVStore实例。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 ### get8+ ### @@ -3927,7 +3927,7 @@ get(deviceId: string, key: string, callback: AsyncCallback<boolean|string|num 获取与指定设备 ID 和 key 匹配的 String 值,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -3937,7 +3937,7 @@ get(deviceId: string, key: string, callback: AsyncCallback<boolean|string|num | key |string | 是 |表示要查询 key 值的键。 | | callback |AsyncCallback<boolean\|string\|number\|Uint8Array> | 是 |回调函数,返回匹配给定条件的字符串值。 | -**示例** +**示例:** ```js let kvStore; @@ -3962,7 +3962,7 @@ get(deviceId: string, key: string): Promise<boolean|string|number|Uint8Array& 获取与指定设备 ID 和 key 匹配的 String 值,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -3977,7 +3977,7 @@ get(deviceId: string, key: string): Promise<boolean|string|number|Uint8Array& | ------ | ------- | |Promise<boolean\|string\|number\|Uint8Array> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -4006,7 +4006,7 @@ getEntries(deviceId: string, keyPrefix: string, callback: AsyncCallback<Entry 获取与指定设备 ID 和 key 前缀匹配的所有键值对,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4016,7 +4016,7 @@ getEntries(deviceId: string, keyPrefix: string, callback: AsyncCallback<Entry | keyPrefix |string | 是 |表示要匹配的键前缀。 | | callback |AsyncCallback<[Entry](#entry)[]> | 是 |回调函数,返回满足给定条件的所有键值对的列表。 | -**示例** +**示例:** ```js let kvStore; @@ -4054,7 +4054,7 @@ getEntries(deviceId: string, keyPrefix: string): Promise<Entry[]> 获取与指定设备 ID 和 key 前缀匹配的所有键值对,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4069,7 +4069,7 @@ getEntries(deviceId: string, keyPrefix: string): Promise<Entry[]> | ------ | ------- | |Promise<[Entry](#entry)[]> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -4113,7 +4113,7 @@ getEntries(query: Query, callback: AsyncCallback<Entry[]>): void 获取与指定 Query 对象匹配的键值对列表,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4122,7 +4122,7 @@ getEntries(query: Query, callback: AsyncCallback<Entry[]>): void | query |[Query](#query8) | 是 |表示查询对象。 | | callback |AsyncCallback<[Entry](#entry)[]> | 是 |回调函数,返回与指定 Query 对象匹配的键值对列表。 | -**示例** +**示例:** ```js let kvStore; @@ -4166,7 +4166,7 @@ getEntries(query: Query): Promise<Entry[]> 获取与指定 Query 对象匹配的键值对列表,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4180,7 +4180,7 @@ getEntries(query: Query): Promise<Entry[]> | ------ | ------- | |Promise<[Entry](#entry)[]> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -4224,7 +4224,7 @@ getEntries(deviceId: string, query: Query, callback: AsyncCallback<Entry[]> 获取与指定设备 ID 和 Query 对象匹配的键值对列表,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4234,7 +4234,7 @@ getEntries(deviceId: string, query: Query, callback: AsyncCallback<Entry[]> | query |[Query](#query8) | 是 |表示查询对象。 | | callback |AsyncCallback<[Entry](#entry)[]> | 是 |回调函数,返回与指定 Query 对象匹配的键值对列表。 | -**示例** +**示例:** ```js let kvStore; @@ -4278,7 +4278,7 @@ getEntries(deviceId: string, query: Query): Promise<Entry[]> 获取与指定设备 ID 和 Query 对象匹配的键值对列表,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4293,7 +4293,7 @@ getEntries(deviceId: string, query: Query): Promise<Entry[]> | ------ | ------- | |Promise<[Entry](#entry)[]> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -4338,7 +4338,7 @@ getResultSet(deviceId: string, keyPrefix: string, callback: AsyncCallback<KvS 获取与指定设备 ID 和 key 前缀匹配的 KvStoreResultSet 对象,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4348,7 +4348,7 @@ getResultSet(deviceId: string, keyPrefix: string, callback: AsyncCallback<KvS | keyPrefix |string | 是 |表示要匹配的键前缀。 | | callback |AsyncCallback<[KvStoreResultSet](#kvstoreresultset8)[]> | 是 |回调函数,返回 KvStoreResultSet 对象。 | -**示例** +**示例:** ```js let kvStore; @@ -4373,7 +4373,7 @@ getResultSet(deviceId: string, keyPrefix: string): Promise<KvStoreResultSet&g 获取与指定设备 ID 和 key 前缀匹配的 KvStoreResultSet 对象,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4388,7 +4388,7 @@ getResultSet(deviceId: string, keyPrefix: string): Promise<KvStoreResultSet&g | ------ | ------- | |Promise<[KvStoreResultSet](#kvstoreresultset8)[]> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -4417,7 +4417,7 @@ getResultSet(query: Query, callback: AsyncCallback<KvStoreResultSet>): voi 获取与指定 Query 对象匹配的 KvStoreResultSet 对象,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4426,7 +4426,7 @@ getResultSet(query: Query, callback: AsyncCallback<KvStoreResultSet>): voi | query |[Query](#query8) | 是 |表示查询对象。 | | callback |AsyncCallback<[KvStoreResultSet](#kvstoreresultset8)[]> | 是 |回调函数,返回与指定 Query 对象匹配的 KvStoreResultSet 对象。 | -**示例** +**示例:** ```js let kvStore; @@ -4469,7 +4469,7 @@ getResultSet(query: Query): Promise<KvStoreResultSet> 获取与指定 Query 对象匹配的 KvStoreResultSet 对象,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4483,7 +4483,7 @@ getResultSet(query: Query): Promise<KvStoreResultSet> | ------ | ------- | |Promise<[KvStoreResultSet](#kvstoreresultset8)[]> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -4533,7 +4533,7 @@ getResultSet(deviceId: string, query: Query, callback: AsyncCallback<KvStoreR 获取与指定设备ID和Query对象匹配的KvStoreResultSet对象,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4543,7 +4543,7 @@ getResultSet(deviceId: string, query: Query, callback: AsyncCallback<KvStoreR | query |[Query](#query8) | 是 |表示查询对象。 | | callback |AsyncCallback<[KvStoreResultSet](#kvstoreresultset8)[]> | 是 |回调函数,返回与指定 Query 对象匹配的 KvStoreResultSet 对象。 | -**示例** +**示例:** ```js let kvStore; @@ -4585,7 +4585,7 @@ getResultSet(deviceId: string, query: Query): Promise<KvStoreResultSet> 获取与指定设备ID和Query对象匹配的KvStoreResultSet对象,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4600,7 +4600,7 @@ getResultSet(deviceId: string, query: Query): Promise<KvStoreResultSet> | ------ | ------- | |Promise<[KvStoreResultSet](#kvstoreresultset8)[]> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -4651,7 +4651,7 @@ closeResultSet(resultSet: KvStoreResultSet, callback: AsyncCallback<void>) 关闭由 getResultSet 返回的 KvStoreResultSet 对象,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4660,7 +4660,7 @@ closeResultSet(resultSet: KvStoreResultSet, callback: AsyncCallback<void>) | resultSet |[KvStoreResultSet](#getresultset8) | 是 |指示要关闭的 KvStoreResultSet 对象。 | | callback |AsyncCallback<void> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -4686,7 +4686,7 @@ closeResultSet(resultSet: KvStoreResultSet): Promise<void> 关闭由 getResultSet 返回的 KvStoreResultSet 对象,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4700,7 +4700,7 @@ closeResultSet(resultSet: KvStoreResultSet): Promise<void> | ------ | ------- | |Promise<void> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -4724,7 +4724,7 @@ getResultSize(query: Query, callback: AsyncCallback<number>): void 获取与指定 Query 对象匹配的结果数,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4733,7 +4733,7 @@ getResultSize(query: Query, callback: AsyncCallback<number>): void | query |[Query](#query8) | 是 |表示查询对象。 | | callback |AsyncCallback<number> | 是 |回调函数,返回与指定 Query 对象匹配的结果数。 | -**示例** +**示例:** ```js let kvStore; @@ -4771,7 +4771,7 @@ getResultSize(query: Query): Promise<number> 获取与指定 Query 对象匹配的结果数,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4785,7 +4785,7 @@ getResultSize(query: Query): Promise<number> | ------ | ------- | |Promise<number> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -4827,7 +4827,7 @@ getResultSize(deviceId: string, query: Query, callback: AsyncCallback<number& 获取与指定设备 ID 和 Query 对象匹配的结果数,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4837,7 +4837,7 @@ getResultSize(deviceId: string, query: Query, callback: AsyncCallback<number& | query |[Query](#query8) | 是 |表示查询对象。 | | callback |AsyncCallback<number> | 是 |回调函数,返回与指定 Query 对象匹配的结果数。 | -**示例** +**示例:** ```js let kvStore; @@ -4874,7 +4874,7 @@ getResultSize(deviceId: string, query: Query): Promise<number> 获取与指定设备 ID 和 Query 对象匹配的结果数,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4889,7 +4889,7 @@ getResultSize(deviceId: string, query: Query): Promise<number> | ------ | ------- | |Promise<number> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -4930,7 +4930,7 @@ removeDeviceData(deviceId: string, callback: AsyncCallback<void>): void 从当前数据库中删除指定设备的数据,并通过callback方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4939,7 +4939,7 @@ removeDeviceData(deviceId: string, callback: AsyncCallback<void>): void | deviceId |string | 是 |标识要删除其数据的设备。 | | callback |AsyncCallback<void> | 是 |回调函数。 | -**示例** +**示例:** ```js let kvStore; @@ -4972,7 +4972,7 @@ removeDeviceData(deviceId: string): Promise<void> 从当前数据库中删除指定设备的数据,并通过Promise方式返回,此方法为异步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。 **参数:** @@ -4986,7 +4986,7 @@ removeDeviceData(deviceId: string): Promise<void> | ------ | ------- | |Promise<void> |Promise实例,用于获取异步返回结果。| -**示例** +**示例:** ```js let kvStore; @@ -5023,7 +5023,7 @@ sync(deviceIdList: string[], mode: SyncMode, allowedDelayMs?: number): void **需要权限**: ohos.permission.DISTRIBUTED_DATASYNC。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -5033,7 +5033,7 @@ sync(deviceIdList: string[], mode: SyncMode, allowedDelayMs?: number): void | mode |[SyncMode](#syncmode) | 是 |表示同步方式,PUSH、PULL或PUSH_PULL。 | | allowedDelayMs |number | 否 |可选参数,允许延时时间,单位:ms(毫秒)。 | -**示例** +**示例:** ```js let kvStore; @@ -5060,7 +5060,7 @@ on(event: 'syncComplete', syncCallback: Callback<Array<[string, number]> 订阅同步完成事件回调通知,该方法为同步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -5069,7 +5069,7 @@ on(event: 'syncComplete', syncCallback: Callback<Array<[string, number]> | event |string | 是 |订阅的事件名,固定为'syncComplete',表示同步完成事件。 | | syncCallback |Callback | 是 |用于向调用方发送同步结果的回调。 | -**示例** +**示例:** ```js const KEY_TEST_FLOAT_ELEMENT = 'key_test_float'; @@ -5095,7 +5095,7 @@ off(event: 'syncComplete', syncCallback?: Callback<Array<[string, number]& 取消订阅同步完成事件回调通知,该方法为同步方法。 -**系统能力**: SystemCapability.DistributedDataManager.KVStore.Core。 +**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。 **参数:** @@ -5104,7 +5104,7 @@ off(event: 'syncComplete', syncCallback?: Callback<Array<[string, number]& | event |string | 是 |取消订阅的事件名,固定为'syncComplete',表示同步完成事件。 | | syncCallback |Callback ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** +> **说明:** > 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 ## 导入模块 @@ -13,7 +13,7 @@ import screenshot from '@ohos.screenshot'; 设置截取图像的信息。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。 | 参数名 | 类型 | 必填 | 说明 | @@ -27,7 +27,7 @@ import screenshot from '@ohos.screenshot'; 表示截取图像的区域。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。 | 参数名 | 类型 | 必填 | 说明 | | ------ | ------ | ---- | ------------------------------------------------------------ | @@ -41,7 +41,7 @@ import screenshot from '@ohos.screenshot'; 表示截取图像的大小。 -**系统能力**:以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。 | 参数名 | 类型 | 必填 | 说明 | | ------ | ------ | ---- | ------------------------------------------------------------ | @@ -54,7 +54,7 @@ save(options?: ScreenshotOptions, callback: AsyncCallback<image.PixelMap>) 获取屏幕截图。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **需要权限**:ohos.permission.CAPTURE_SCREEN @@ -94,15 +94,15 @@ save(options?: ScreenshotOptions): Promise<image.PixelMap> 获取屏幕截图。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **需要权限**:ohos.permission.CAPTURE_SCREEN **参数:** - | 参数名 | 类型 | 必填 | 说明 | - | ------- | --------------------------------------- | ---- | ------------------------------------------------------------ | - | options | [ScreenshotOptions](#screenshotoptions) | 否 | 该类型的参数包含screenRect,imageSize,rotation三个参数,需要分别设置这三个参数。 | +| 参数名 | 类型 | 必填 | 说明 | +| ------- | --------------------------------------- | ---- | ------------------------------------------------------------ | +| options | [ScreenshotOptions](#screenshotoptions) | 否 | 该类型的参数包含screenRect、imageSize、rotation三个参数,需要分别设置这三个参数。 | **返回值:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-storage.md b/zh-cn/application-dev/reference/apis/js-apis-system-storage.md index b6893023f20e063ec8cf8ab7f01b1609632a7d6c..2b2d824d1019b72cc3796462e163272d3d2fca7e 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-system-storage.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-storage.md @@ -1,6 +1,6 @@ # 数据存储 -> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** +> **说明:** > > - 从API Version 6开始,该模块不再维护,可以使用模块[`@ohos.data.storage`](js-apis-data-storage.md)。在API Version 9后,推荐使用新模块[`@ohos.data.preferences`](js-apis-data-preferences.md)。 > @@ -21,7 +21,7 @@ get(Object): void 通过索引读取缓存中存储的值。 -**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** @@ -61,7 +61,7 @@ set(Object): void 修改缓存中索引对应的值。 -**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** @@ -99,7 +99,7 @@ clear(Object): void 清空缓存中存储的键值对。 -**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** @@ -133,7 +133,7 @@ delete(Object): void 删除缓存中索引对应的键值对。 -**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core +**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **参数:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-usb.md b/zh-cn/application-dev/reference/apis/js-apis-usb.md index 0965e87e8be781726ae6844252f9f18171bd3602..8b29d3db39010ff58d7b15fb5afb4b7ecaae66f4 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-usb.md +++ b/zh-cn/application-dev/reference/apis/js-apis-usb.md @@ -1,6 +1,6 @@ # USB管理 -> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** +> **说明:** > 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 ## 导入模块 @@ -15,9 +15,10 @@ getDevices(): Array<Readonly<USBDevice>> 获取USB设备列表。 -**系统能力**: SystemCapability.USB.USBManager +**系统能力:** SystemCapability.USB.USBManager **返回值:** + | 类型 | 说明 | | -------- | -------- | | Array<Readonly<[USBDevice](#usbdevice)>> | 设备信息列表。 | @@ -87,7 +88,7 @@ connectDevice(device: USBDevice): Readonly<USBDevicePipe> 需要调用[usb.getDevices](#usbgetdevices)获取设备信息以及device;再调用[usb.requestRight](#usbrequestright)获取设备请求权限。 -**系统能力**: SystemCapability.USB.USBManager +**系统能力:** SystemCapability.USB.USBManager **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -112,7 +113,7 @@ hasRight(deviceName: string): boolean 判断是否有权访问该设备。 -**系统能力**: SystemCapability.USB.USBManager +**系统能力:** SystemCapability.USB.USBManager **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -138,7 +139,7 @@ requestRight(deviceName: string): Promise<boolean> 请求软件包的临时权限以访问设备。 -**系统能力**: SystemCapability.USB.USBManager +**系统能力:** SystemCapability.USB.USBManager **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -167,7 +168,7 @@ claimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): numbe 需要调用[usb.getDevices](#usbgetdevices)获取设备信息以及interfaces;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)接口得到devicepipe作为参数。 -**系统能力**: SystemCapability.USB.USBManager +**系统能力:** SystemCapability.USB.USBManager **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -196,7 +197,7 @@ releaseInterface(pipe: USBDevicePipe, iface: USBInterface): number 需要调用[usb.claimInterface](#usbclaiminterface)先获取接口,才能使用此方法释放接口。 -**系统能力**: SystemCapability.USB.USBManager +**系统能力:** SystemCapability.USB.USBManager **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -224,7 +225,7 @@ setConfiguration(pipe: USBDevicePipe, config: USBConfig): number 需要调用[usb.getDevices](#usbgetdevices)获取设备信息以及config;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)得到devicepipe作为参数。 -**系统能力**: SystemCapability.USB.USBManager +**系统能力:** SystemCapability.USB.USBManager **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -252,7 +253,7 @@ setInterface(pipe: USBDevicePipe, iface: USBInterface): number 需要调用[usb.getDevices](#usbgetdevices)获取设备列表以及interfaces;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)得到devicepipe作为参数。 -**系统能力**: SystemCapability.USB.USBManager +**系统能力:** SystemCapability.USB.USBManager **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -280,7 +281,7 @@ getRawDescriptor(pipe: USBDevicePipe): Uint8Array 需要调用[usb.getDevices](#usbgetdevices)获取设备列表;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)接口得到devicepipe作为参数。 -**系统能力**: SystemCapability.USB.USBManager +**系统能力:** SystemCapability.USB.USBManager **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -306,17 +307,18 @@ getFileDescriptor(pipe: USBDevicePipe): number 需要调用[usb.getDevices](#usbgetdevices)获取设备列表;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)接口得到devicepipe作为参数。 -**系统能力**: SystemCapability.USB.USBManager +**系统能力:** SystemCapability.USB.USBManager **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | pipe | [USBDevicePipe](#usbdevicepipe) | 是 | 用于确定总线号和设备地址。 | -- 返回值: - | 类型 | 说明 | - | -------- | -------- | - | number | 返回设备对应的文件描述符。 | +**返回值:** + +| 类型 | 说明 | +| -------- | -------- | +| number | 返回设备对应的文件描述符。 | **示例:** ```js @@ -332,7 +334,7 @@ controlTransfer(pipe: USBDevicePipe, contrlparam: USBControlParams, timeout?: nu 需要调用[usb.getDevices](#usbgetdevices)获取设备列表;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)接口得到devicepipe作为参数。 -**系统能力**: SystemCapability.USB.USBManager +**系统能力:** SystemCapability.USB.USBManager **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -362,7 +364,7 @@ bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, tim 需要调用[usb.getDevices](#usbgetdevices)获取设备信息列表以及endpoint;再调用[usb.requestRight](#usbrequestright)获取设备请求权限;然后调用[usb.connectDevice](#usbconnectdevice)接口得到返回数据devicepipe之后,再次获取接口[usb.claimInterface](#usbclaiminterface);再调用usb.bulkTransfer接口。 -**系统能力**: SystemCapability.USB.USBManager +**系统能力:** SystemCapability.USB.USBManager **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -396,7 +398,7 @@ closePipe(pipe: USBDevicePipe): number 需要调用[usb.getDevices](#usbgetdevices)获取设备列表;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)得到devicepipe作为参数。 -**系统能力**: SystemCapability.USB.USBManager +**系统能力:** SystemCapability.USB.USBManager **参数:** | 参数名 | 类型 | 必填 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-webgl.md b/zh-cn/application-dev/reference/apis/js-apis-webgl.md index a75ff297d84a092281fd83f60d067dfd2310094a..4665a9b2f71a6e21baffb1330f2eb7569976b99b 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-webgl.md +++ b/zh-cn/application-dev/reference/apis/js-apis-webgl.md @@ -1,6 +1,6 @@ # webgl -> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** +> **说明:** > 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 @@ -34,7 +34,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0); ## Type -**系统能力**:以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。 **表1** Type @@ -62,7 +62,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0); ## Interface -**系统能力**:以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。 **表2** Interface diff --git a/zh-cn/application-dev/reference/apis/js-apis-webgl2.md b/zh-cn/application-dev/reference/apis/js-apis-webgl2.md index 59f475ff37f45ea7ae8ff4827ee3867d3947e720..aca7ad62d3759c953a3235563b2d57c1ad416f22 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-webgl2.md +++ b/zh-cn/application-dev/reference/apis/js-apis-webgl2.md @@ -1,6 +1,6 @@ # webgl2 -> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** +> **说明:** > 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 @@ -34,7 +34,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0); ## Type -**系统能力**:以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL2。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL2。 **表1** Type @@ -48,7 +48,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0); ## Interface -**系统能力**:以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL2。 +**系统能力:** 以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL2。 **表2** Interface diff --git a/zh-cn/application-dev/reference/apis/js-apis-window.md b/zh-cn/application-dev/reference/apis/js-apis-window.md index aa4719cc458eac45456bc542fe32ecd7903bfdec..507f67d85cf93cf3b8c0abfc7546213e10b0236b 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-window.md +++ b/zh-cn/application-dev/reference/apis/js-apis-window.md @@ -1,10 +1,9 @@ # 窗口 -窗口提供管理窗口的一些基础能力,包括对窗口的创建、销毁,以及对串口的属性设置等各项功能。 +窗口提供管理窗口的一些基础能力,包括对窗口的创建、销毁,以及对窗口的属性设置等各项功能。 -> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** +> **说明:** > 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 -> ## 导入模块 @@ -16,7 +15,7 @@ import window from '@ohos.window'; 窗口类型。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 | 名称 | 默认值 | 说明 | | ----------------- | ------ | ------------------ | @@ -27,7 +26,7 @@ import window from '@ohos.window'; 窗口内容需要规避区域的类型。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 | 名称 | 默认值 | 说明 | | ----------- | ------ | ------------------ | @@ -40,7 +39,7 @@ import window from '@ohos.window'; 此接口为系统接口,三方应用不支持调用。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 | 名称 | 默认值 | 说明 | | ---------- | ------ | ----------------------------- | @@ -54,7 +53,7 @@ import window from '@ohos.window'; 状态栏导航栏的属性。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------------------------------------- | -------- | ---- | ---- | ------------------------------------------------------------ | @@ -71,7 +70,7 @@ import window from '@ohos.window'; 此接口为系统接口,三方应用不支持调用。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 | 名称 | 参数类型 | 可读 | 可写 | 说明 | | --------------- | ------------------------- | ---- | ---- | ------------------------------------------------------------ | @@ -87,7 +86,7 @@ import window from '@ohos.window'; 此接口为系统接口,三方应用不支持调用。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 | 名称 | 参数类型 | 可读 | 可写 | 说明 | | ---------- | --------------------------------------------------- | ---- | ---- | -------------------------- | @@ -96,9 +95,9 @@ import window from '@ohos.window'; ## Rect7+ -矩形。 +窗口矩形区域。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 | 名称 | 参数类型 | 可读 | 可写 | 说明 | | ------ | -------- | ---- | ---- | ------------------ | @@ -111,7 +110,7 @@ import window from '@ohos.window'; 表示窗口内容规避区域。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 | 名称 | 参数类型 | 可读 | 可写 | 说明 | | ---------- | ------------- | ---- | ---- | ------------------ | @@ -124,7 +123,7 @@ import window from '@ohos.window'; 窗口大小。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 | 名称 | 参数类型 | 可读 | 可写 | 说明 | | ------ | -------- | ---- | ---- | ---------- | @@ -135,7 +134,7 @@ import window from '@ohos.window'; 窗口属性。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 | 名称 | 参数类型 | 可读 | 可写 | 说明 | | ------------------------------- | ------------------------- | ---- | ---- | ------------------------------------------------------------ | @@ -156,7 +155,7 @@ import window from '@ohos.window'; 色域模式。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 +**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。 | 名称 | 默认值 | 说明 | | ---------- | ------ | -------------- | @@ -171,7 +170,7 @@ create(id: string, type: WindowType, callback: AsyncCallback<Window>): voi 从API version 8开始,此接口废弃,推荐使用[window.create8+](#windowcreate8)接口。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -204,7 +203,7 @@ create(id: string, type: WindowType): Promise<Window> 从API version 8开始,此接口废弃,推荐使用[window.create8+](#windowcreate8)接口。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -240,7 +239,7 @@ create(ctx: Context, id: string, type: WindowType, callback: AsyncCallback<Wi 从API version 9开始,当Context为[ServiceExtensionContext](js-apis-service-extension-context.md)时,创建系统窗口,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -274,7 +273,7 @@ create(ctx: Context, id: string, type: WindowType): Promise<Window> 从API version 9开始,当Context为[ServiceExtensionContext](js-apis-service-extension-context.md)时,创建系统窗口,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -309,7 +308,7 @@ find(id: string, callback: AsyncCallback<Window>): void 查找id所对应的窗口,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -338,7 +337,7 @@ find(id: string): Promise<Window> 查找id所对应的窗口,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -371,7 +370,9 @@ getTopWindow(callback: AsyncCallback<Window>): void 获取当前应用内最后显示的窗口,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +从API version 8开始,此接口废弃,推荐使用[window.getTopWindow8+](#windowgettopwindow8)接口。 + +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -399,7 +400,9 @@ getTopWindow(): Promise<Window> 获取当前应用内最后显示的窗口,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +从API version 8开始,此接口废弃,推荐使用[window.getTopWindow8+](#windowgettopwindow8)接口。 + +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **返回值:** @@ -426,7 +429,7 @@ getTopWindow(ctx: Context, callback: AsyncCallback<Window>): void 获取当前应用内最后显示的窗口,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -455,7 +458,7 @@ getTopWindow(ctx: Context): Promise<Window> 获取当前应用内最后显示的窗口,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -490,7 +493,7 @@ on(type: 'systemBarTintChange', callback: Callback<SystemBarTintState>): v 此接口为系统接口,三方应用不支持调用。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -516,7 +519,7 @@ off(type: 'systemBarTintChange', callback?: Callback<SystemBarTintState >) 此接口为系统接口,三方应用不支持调用。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -544,7 +547,7 @@ hide (callback: AsyncCallback<void>): void 此接口为系统接口,三方应用不支持调用。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -572,7 +575,7 @@ hide(): Promise<void> 此接口为系统接口,三方应用不支持调用。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **返回值:** @@ -597,7 +600,7 @@ show(callback: AsyncCallback<void>): void 显示当前窗口,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -623,7 +626,7 @@ show(): Promise<void> 显示当前窗口,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **返回值:** @@ -648,7 +651,7 @@ destroy(callback: AsyncCallback<void>): void 销毁当前窗口,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -674,7 +677,7 @@ destroy(): Promise<void> 销毁当前窗口,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **返回值:** @@ -699,7 +702,7 @@ moveTo(x: number, y: number, callback: AsyncCallback<void>): void 移动窗口位置,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -728,7 +731,7 @@ moveTo(x: number, y: number): Promise<void> 移动窗口位置,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -760,7 +763,7 @@ resetSize(width: number, height: number, callback: AsyncCallback<void>): v 改变当前窗口大小,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -788,7 +791,7 @@ resetSize(width: number, height: number): Promise<void> 改变当前窗口大小,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -822,7 +825,7 @@ setWindowType(type: WindowType, callback: AsyncCallback<void>): void 此接口为系统接口,三方应用不支持调用。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -852,7 +855,7 @@ setWindowType(type: WindowType): Promise<void> 此接口为系统接口,三方应用不支持调用。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -884,7 +887,7 @@ getProperties(callback: AsyncCallback<WindowProperties>): void 获取当前窗口的属性,使用callback方式作为异步方法返回WindowProperties。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -910,7 +913,7 @@ getProperties(): Promise<WindowProperties> 获取当前窗口的属性,使用promise方式作为异步方法返回WindowProperties。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **返回值:** @@ -935,7 +938,7 @@ getAvoidArea(type: AvoidAreaType, callback: AsyncCallback<AvoidArea>): voi 获取窗口内容规避的区域,如系统的系统栏区域、凹凸区域。使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -963,7 +966,7 @@ getAvoidArea(type: AvoidAreaType): Promise<AvoidArea> 获取窗口内容规避的区域,如系统的系统栏区域、凹凸区域。使用promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -994,7 +997,7 @@ setFullScreen(isFullScreen: boolean, callback: AsyncCallback<void>): void 设置是否为全屏状态,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1022,7 +1025,7 @@ setFullScreen(isFullScreen: boolean): Promise<void> 设置是否为全屏状态,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1054,7 +1057,7 @@ setLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback<void 设置窗口的布局是否为全屏显示状态,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1082,7 +1085,7 @@ setLayoutFullScreen(isLayoutFullScreen: boolean): Promise<void> 设置窗口的布局是否为全屏显示状态,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1114,7 +1117,7 @@ setSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallbac 设置导航栏、状态栏的可见模式,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1142,7 +1145,7 @@ setSystemBarEnable(names: Array<'status' | 'navigation'>): Promise<void> 设置导航栏、状态栏的可见模式,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1174,7 +1177,7 @@ setSystemBarProperties(systemBarProperties: SystemBarProperties, callback: Async 设置窗口内导航栏、状态栏的属性,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1211,7 +1214,7 @@ setSystemBarProperties(systemBarProperties: SystemBarProperties): Promise<voi 设置窗口内导航栏、状态栏的属性,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1252,7 +1255,7 @@ loadContent(path: string, callback: AsyncCallback<void>): void 当前窗口加载具体页面内容,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1279,7 +1282,7 @@ loadContent(path: string): Promise<void> 当前窗口加载具体页面内容,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1310,7 +1313,7 @@ isShowing(callback: AsyncCallback<boolean>): void 判断当前窗口是否已显示,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1336,7 +1339,7 @@ isShowing(): Promise<boolean> 判断当前窗口是否已显示,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **返回值:** @@ -1361,7 +1364,7 @@ on(type: 'windowSizeChange', callback: Callback<Size>): void 开启监听。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1385,7 +1388,7 @@ off(type: 'windowSizeChange', callback?: Callback<Size >): void 关闭监听。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1407,7 +1410,7 @@ on(type: 'systemAvoidAreaChange', callback: Callback<AvoidArea>): void 开启监听。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1431,7 +1434,7 @@ off(type: 'systemAvoidAreaChange', callback?: Callback<AvoidArea>): void 关闭监听。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1455,7 +1458,7 @@ on(type: 'keyboardHeightChange', callback: Callback<number>): void 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1481,7 +1484,7 @@ off(type: 'keyboardHeightChange', callback?: Callback<number>): void 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1503,7 +1506,7 @@ isSupportWideGamut(callback: AsyncCallback<boolean>): void 判断当前窗口是否支持广色域模式,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1529,7 +1532,7 @@ isSupportWideGamut(): Promise<boolean> 判断当前窗口是否支持广色域模式,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **返回值:** @@ -1554,7 +1557,7 @@ setColorSpace(colorSpace:ColorSpace, callback: AsyncCallback<void>): void 设置当前窗口为广色域模式或默认色域模式,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1581,7 +1584,7 @@ setColorSpace(colorSpace:ColorSpace): Promise<void> 设置当前窗口为广色域模式或默认色域模式,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1612,7 +1615,7 @@ getColorSpace(callback: AsyncCallback<ColorSpace>): void 获取当前窗口色域模式,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1638,7 +1641,7 @@ getColorSpace(): Promise<ColorSpace> 获取当前窗口色域模式,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **返回值:** @@ -1665,7 +1668,7 @@ setBackgroundColor(color: string, callback: AsyncCallback<void>): void 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1695,7 +1698,7 @@ setBackgroundColor(color: string): Promise<void> 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1729,7 +1732,7 @@ setBrightness(brightness: number, callback: AsyncCallback<void>): void 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1759,7 +1762,7 @@ setBrightness(brightness: number): Promise<void> 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1793,7 +1796,7 @@ setDimBehind(dimBehindValue: number, callback: AsyncCallback<void>): void 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1822,7 +1825,7 @@ setDimBehind(dimBehindValue: number): Promise<void> 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1855,7 +1858,7 @@ setFocusable(isFocusable: boolean, callback: AsyncCallback<void>): void 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1885,7 +1888,7 @@ setFocusable(isFocusable: boolean): Promise<void> 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1919,7 +1922,7 @@ setKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback<void>): v 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1949,7 +1952,7 @@ setKeepScreenOn(isKeepScreenOn: boolean): Promise<void> 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -1983,7 +1986,7 @@ setOutsideTouchable(touchable: boolean, callback: AsyncCallback<void>): vo 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -2012,7 +2015,7 @@ setOutsideTouchable(touchable: boolean): Promise<void> 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -2045,7 +2048,7 @@ setPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): voi 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -2076,7 +2079,7 @@ setPrivacyMode(isPrivacyMode: boolean): Promise<void> 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -2110,7 +2113,7 @@ setTouchable(isTouchable: boolean, callback: AsyncCallback<void>): void 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -2141,7 +2144,7 @@ setTouchable(isTouchable: boolean): Promise<void> 本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -2171,7 +2174,7 @@ setTouchable(isTouchable: boolean): Promise<void> WindowStage生命周期。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core +**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core | 名称 | 默认值 | 说明 | | ---------- | ------ | -------- | @@ -2190,7 +2193,7 @@ getMainWindow(): Promise<Window> 获取该WindowStage实例下的主窗口,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **返回值:** @@ -2222,7 +2225,7 @@ getMainWindow(callback: AsyncCallback<Window>): void 获取该WindowStage实例下的主窗口,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -2255,7 +2258,7 @@ createSubWindow(name: string): Promise<Window> 创建该WindowStage实例下的子窗口,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -2293,7 +2296,7 @@ createSubWindow(name: string, callback: AsyncCallback<Window>): void 创建该WindowStage实例下的子窗口,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -2328,7 +2331,7 @@ getSubWindow(): Promise<Array<Window>> 获取该WindowStage实例下的所有子窗口,使用Promise方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **返回值:** @@ -2360,7 +2363,7 @@ getSubWindow(callback: AsyncCallback<Array<Window>>): void 获取该WindowStage实例下的所有子窗口,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -2393,7 +2396,7 @@ loadContent(path: string, callback: AsyncCallback<void>): void 为当前WindowStage的主窗口加载具体页面内容,使用callback方式作为异步方法。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Coretype为'windowSizeChange' +**系统能力:** SystemCapability.WindowManager.WindowManager.Coretype为'windowSizeChange' **参数:** @@ -2425,7 +2428,7 @@ on(eventType: 'windowStageEvent', callback: Callback<WindowStageEventType> 开启WindowStage生命周期变化的监听。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -2454,7 +2457,7 @@ off(eventType: 'windowStageEvent', callback?: Callback<WindowStageEventType&g 关闭WindowStage生命周期变化的监听。 -**系统能力**:SystemCapability.WindowManager.WindowManager.Core +**系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** diff --git a/zh-cn/application-dev/webgl/webgl-guidelines.md b/zh-cn/application-dev/webgl/webgl-guidelines.md index 48e4c98715f74acb9729f37f7cadbefe94182b5d..f447acd3a74f932a8b9db94a25b2b2cb4c1eb112 100644 --- a/zh-cn/application-dev/webgl/webgl-guidelines.md +++ b/zh-cn/application-dev/webgl/webgl-guidelines.md @@ -699,3 +699,9 @@ WebGL主要帮助开发者在前端开发中完成图形图像的相关处理, **图2** 点击按钮绘制彩色三角形的效果图 ![zh-cn_image_0000001192429306](figures/zh-cn_image_0000001192429306.gif) + +## 相关实例 + +针对WebGL开发,有以下相关实例可供参考: + +- [`JsWbgGL`:WebGL(JS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/Graphics/JsWebGL) diff --git a/zh-cn/application-dev/windowmanager/screenshot-guidelines.md b/zh-cn/application-dev/windowmanager/screenshot-guidelines.md index 749d93c7aafc2a69ab63484e2b85a65d9d36598d..0efd7e4205ffed5fbf567ce7d0041798c6432392 100644 --- a/zh-cn/application-dev/windowmanager/screenshot-guidelines.md +++ b/zh-cn/application-dev/windowmanager/screenshot-guidelines.md @@ -37,5 +37,5 @@ screenshot.save(ScreenshotOptions).then((image) => { ``` ## 相关实例 针对屏幕截图开发,有以下相关实例可供参考: -- [`Screenshot`:基础功能-屏幕截图(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/Basic/Screenshot) +- [`Screenshot`:屏幕截图(eTS)(API9)](https://gitee.com/openharmony/app_samples/tree/master/Basic/Screenshot)