Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
bdec4940
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bdec4940
编写于
5月 13, 2022
作者:
G
ge-yafang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update docs
Signed-off-by:
N
ge-yafang
<
geyafang@huawei.com
>
上级
0368e671
变更
23
展开全部
隐藏空白更改
内联
并排
Showing
23 changed file
with
606 addition
and
636 deletion
+606
-636
zh-cn/application-dev/ability/fa-brief.md
zh-cn/application-dev/ability/fa-brief.md
+2
-0
zh-cn/application-dev/ability/fa-pageability.md
zh-cn/application-dev/ability/fa-pageability.md
+1
-1
zh-cn/application-dev/ability/fa-serviceability.md
zh-cn/application-dev/ability/fa-serviceability.md
+1
-1
zh-cn/application-dev/ability/stage-ability.md
zh-cn/application-dev/ability/stage-ability.md
+7
-7
zh-cn/application-dev/ability/stage-call.md
zh-cn/application-dev/ability/stage-call.md
+1
-1
zh-cn/application-dev/ability/stage-serviceextension.md
zh-cn/application-dev/ability/stage-serviceextension.md
+1
-1
zh-cn/application-dev/database/database-relational-guidelines.md
...pplication-dev/database/database-relational-guidelines.md
+2
-1
zh-cn/application-dev/quick-start/start-with-js.md
zh-cn/application-dev/quick-start/start-with-js.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-data-ability.md
zh-cn/application-dev/reference/apis/js-apis-data-ability.md
+31
-30
zh-cn/application-dev/reference/apis/js-apis-data-distributedobject.md
...tion-dev/reference/apis/js-apis-data-distributedobject.md
+8
-10
zh-cn/application-dev/reference/apis/js-apis-data-rdb.md
zh-cn/application-dev/reference/apis/js-apis-data-rdb.md
+68
-70
zh-cn/application-dev/reference/apis/js-apis-data-resultset.md
.../application-dev/reference/apis/js-apis-data-resultset.md
+16
-16
zh-cn/application-dev/reference/apis/js-apis-data-storage.md
zh-cn/application-dev/reference/apis/js-apis-data-storage.md
+56
-98
zh-cn/application-dev/reference/apis/js-apis-display.md
zh-cn/application-dev/reference/apis/js-apis-display.md
+9
-9
zh-cn/application-dev/reference/apis/js-apis-distributed-data.md
...pplication-dev/reference/apis/js-apis-distributed-data.md
+254
-254
zh-cn/application-dev/reference/apis/js-apis-screenshot.md
zh-cn/application-dev/reference/apis/js-apis-screenshot.md
+9
-9
zh-cn/application-dev/reference/apis/js-apis-system-storage.md
.../application-dev/reference/apis/js-apis-system-storage.md
+5
-5
zh-cn/application-dev/reference/apis/js-apis-usb.md
zh-cn/application-dev/reference/apis/js-apis-usb.md
+20
-18
zh-cn/application-dev/reference/apis/js-apis-webgl.md
zh-cn/application-dev/reference/apis/js-apis-webgl.md
+3
-3
zh-cn/application-dev/reference/apis/js-apis-webgl2.md
zh-cn/application-dev/reference/apis/js-apis-webgl2.md
+3
-3
zh-cn/application-dev/reference/apis/js-apis-window.md
zh-cn/application-dev/reference/apis/js-apis-window.md
+101
-97
zh-cn/application-dev/webgl/webgl-guidelines.md
zh-cn/application-dev/webgl/webgl-guidelines.md
+6
-0
zh-cn/application-dev/windowmanager/screenshot-guidelines.md
zh-cn/application-dev/windowmanager/screenshot-guidelines.md
+1
-1
未找到文件。
zh-cn/application-dev/ability/fa-brief.md
浏览文件 @
bdec4940
...
@@ -35,6 +35,8 @@ Ability框架在API 8及更早版本使用FA模型。FA模型中Ability分为Pag
...
@@ -35,6 +35,8 @@ Ability框架在API 8及更早版本使用FA模型。FA模型中Ability分为Pag
![
fa-threading-nodel
](
figures/fa-threading-model.png
)
![
fa-threading-nodel
](
figures/fa-threading-model.png
)
## 相关实例
## 相关实例
针对Ability开发,有以下相关实例可供参考:
针对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
)
-
[
分布式调度启动远程FA
](
https://gitee.com/openharmony/codelabs/tree/master/Distributed/RemoteStartFA
)
-
[
分布式新闻客户端
](
https://gitee.com/openharmony/codelabs/tree/master/Distributed/NewsDemo
)
-
[
分布式新闻客户端
](
https://gitee.com/openharmony/codelabs/tree/master/Distributed/NewsDemo
)
-
[
分布式手写板(eTS)
](
https://gitee.com/openharmony/codelabs/tree/master/Distributed/DistributeDatabaseDrawEts
)
-
[
分布式手写板(eTS)
](
https://gitee.com/openharmony/codelabs/tree/master/Distributed/DistributeDatabaseDrawEts
)
...
...
zh-cn/application-dev/ability/fa-pageability.md
浏览文件 @
bdec4940
...
@@ -261,4 +261,4 @@ export default {
...
@@ -261,4 +261,4 @@ export default {
```
```
## 相关实例
## 相关实例
针对PageAbility开发,有以下相关实例可供参考:
针对PageAbility开发,有以下相关实例可供参考:
-
[
`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
)
\ No newline at end of file
\ No newline at end of file
zh-cn/application-dev/ability/fa-serviceability.md
浏览文件 @
bdec4940
...
@@ -399,4 +399,4 @@ export default {
...
@@ -399,4 +399,4 @@ export default {
针对ServiceAbility开发,有以下相关实例可供参考:
针对ServiceAbility开发,有以下相关实例可供参考:
-
[
`ServiceAbility`:ServiceAbility的创建与使用(eTS)(API8)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/ServiceAbility
)
-
[
`ServiceAbility`:ServiceAbility的创建与使用(eTS)(API8)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/ServiceAbility
)
-
[
`DMS`:分布式Demo(eTS)(API
7
)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/DMS
)
-
[
`DMS`:分布式Demo(eTS)(API
8
)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/DMS
)
zh-cn/application-dev/ability/stage-ability.md
浏览文件 @
bdec4940
...
@@ -89,29 +89,29 @@ Ability类拥有context属性,context属性为AbilityContext类,AbilityConte
...
@@ -89,29 +89,29 @@ Ability类拥有context属性,context属性为AbilityContext类,AbilityConte
onCreate
(
want
,
launchParam
)
{
onCreate
(
want
,
launchParam
)
{
console
.
log
(
"
MainAbility onCreate
"
)
console
.
log
(
"
MainAbility onCreate
"
)
}
}
onDestroy
()
{
onDestroy
()
{
console
.
log
(
"
MainAbility onDestroy
"
)
console
.
log
(
"
MainAbility onDestroy
"
)
}
}
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
"
MainAbility onWindowStageCreate
"
)
console
.
log
(
"
MainAbility onWindowStageCreate
"
)
windowStage
.
loadContent
(
"
pages/index
"
).
then
((
data
)
=>
{
windowStage
.
loadContent
(
"
pages/index
"
).
then
((
data
)
=>
{
console
.
log
(
"
MainAbility load content succeed with data:
"
+
JSON
.
stringify
(
data
))
console
.
log
(
"
MainAbility load content succeed with data:
"
+
JSON
.
stringify
(
data
))
}).
catch
((
error
)
=>
{
}).
catch
((
error
)
=>
{
console
.
error
(
"
MainAbility load content failed with error:
"
+
JSON
.
stringify
(
error
))
console
.
error
(
"
MainAbility load content failed with error:
"
+
JSON
.
stringify
(
error
))
})
})
}
}
onWindowStageDestroy
()
{
onWindowStageDestroy
()
{
console
.
log
(
"
MainAbility onWindowStageDestroy
"
)
console
.
log
(
"
MainAbility onWindowStageDestroy
"
)
}
}
onForeground
()
{
onForeground
()
{
console
.
log
(
"
MainAbility onForeground
"
)
console
.
log
(
"
MainAbility onForeground
"
)
}
}
onBackground
()
{
onBackground
()
{
console
.
log
(
"
MainAbility onBackground
"
)
console
.
log
(
"
MainAbility onBackground
"
)
}
}
...
@@ -273,4 +273,4 @@ export default class MainAbility extends Ability { {
...
@@ -273,4 +273,4 @@ export default class MainAbility extends Ability { {
## 相关实例
## 相关实例
针对Stage模型Ability开发,有以下相关示例可供参考:
针对Stage模型Ability开发,有以下相关示例可供参考:
-
[
`StageCallAbility`:StageAbility的创建与使用(eTS)(API9)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility
)
-
[
`StageCallAbility`:Stage
Call
Ability的创建与使用(eTS)(API9)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility
)
zh-cn/application-dev/ability/stage-call.md
浏览文件 @
bdec4940
...
@@ -244,4 +244,4 @@ try {
...
@@ -244,4 +244,4 @@ try {
## 相关实例
## 相关实例
针对Stage模型本地Call功能开发,有以下相关实例可供参考:
针对Stage模型本地Call功能开发,有以下相关实例可供参考:
-
[
`StageCallAbility`:StageAbility的创建与使用(eTS)(API9)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility
)
-
[
`StageCallAbility`:Stage
Call
Ability的创建与使用(eTS)(API9)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility
)
zh-cn/application-dev/ability/stage-serviceextension.md
浏览文件 @
bdec4940
...
@@ -79,4 +79,4 @@ ExtensionAbility,是Stage模型中新增的扩展组件的基类,一般用
...
@@ -79,4 +79,4 @@ ExtensionAbility,是Stage模型中新增的扩展组件的基类,一般用
## 相关实例
## 相关实例
针对ServiceExtensionAbility开发,有以下相关实例可供参考:
针对ServiceExtensionAbility开发,有以下相关实例可供参考:
-
[
`ServiceExtAbility`:StageAbility的创建与使用(eTS)(API9)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/ServiceExtAbility
)
-
[
`ServiceExtAbility`:Stage
Ext
Ability的创建与使用(eTS)(API9)
](
https://gitee.com/openharmony/app_samples/tree/master/ability/ServiceExtAbility
)
zh-cn/application-dev/database/database-relational-guidelines.md
浏览文件 @
bdec4940
...
@@ -309,4 +309,5 @@
...
@@ -309,4 +309,5 @@
## 相关实例
## 相关实例
针对关系型数据库开发,有以下相关实例可供参考:
针对关系型数据库开发,有以下相关实例可供参考:
-
[
`Rdb`:关系型数据库(eTS)(API8)
](
https://gitee.com/openharmony/app_samples/tree/master/data/Rdb
)
-
[
`Rdb`:关系型数据库(eTS)(API8)
](
https://gitee.com/openharmony/app_samples/tree/master/data/Rdb
)
-
[
关系型数据库
](
https://gitee.com/openharmony/codelabs/tree/master/Data/JSRelationshipData
)
-
[
`DistributedRdb`:分布式关系型数据库(eTS)(API8)
](
https://gitee.com/openharmony/app_samples/tree/master/data/DistributedRdb
)
\ No newline at end of file
-
[
关系型数据库
](
https://gitee.com/openharmony/codelabs/tree/master/Data/JSRelationshipData
)
zh-cn/application-dev/quick-start/start-with-js.md
浏览文件 @
bdec4940
...
@@ -214,4 +214,4 @@
...
@@ -214,4 +214,4 @@
恭喜您已经使用JS语言开发(传统代码方式)完成了第一个OpenHarmony应用,快来
[
探索更多的OpenHarmony功能
](
../application-dev-guide.md
)
吧。
恭喜您已经使用JS语言开发(传统代码方式)完成了第一个OpenHarmony应用,快来
[
探索更多的OpenHarmony功能
](
../application-dev-guide.md
)
吧。
## 相关实例
## 相关实例
针对使用JS语言(传统代码方式)开发快速入门,有以下相关实例可供参考:
针对使用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
)
\ No newline at end of file
\ No newline at end of file
zh-cn/application-dev/reference/apis/js-apis-data-ability.md
浏览文件 @
bdec4940
# DataAbility 谓词
# DataAbility 谓词
>
![icon-note.gif](public_sys-resources/icon-note.gif)
**说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
...
@@ -19,9 +19,10 @@ createRdbPredicates(name: string, dataAbilityPredicates: DataAbilityPredicates):
...
@@ -19,9 +19,10 @@ createRdbPredicates(name: string, dataAbilityPredicates: DataAbilityPredicates):
从DataAabilityPredicates对象创建RdbPredicates对象。
从DataAabilityPredicates对象创建RdbPredicates对象。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| name | string | 是 | 数据库表中的表名。 |
| name | string | 是 | 数据库表中的表名。 |
...
@@ -53,7 +54,7 @@ equalTo(field: string, value: ValueType): DataAbilityPredicates
...
@@ -53,7 +54,7 @@ equalTo(field: string, value: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType且值等于指定值的字段。
配置谓词以匹配数据类型为ValueType且值等于指定值的字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -81,7 +82,7 @@ notEqualTo(field: string, value: ValueType): DataAbilityPredicates
...
@@ -81,7 +82,7 @@ notEqualTo(field: string, value: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType且值不等于指定值的字段。
配置谓词以匹配数据类型为ValueType且值不等于指定值的字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -109,7 +110,7 @@ beginWrap(): DataAbilityPredicates
...
@@ -109,7 +110,7 @@ beginWrap(): DataAbilityPredicates
向谓词添加左括号。
向谓词添加左括号。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明 |
...
@@ -136,7 +137,7 @@ endWrap(): DataAbilityPredicates
...
@@ -136,7 +137,7 @@ endWrap(): DataAbilityPredicates
向谓词添加右括号。
向谓词添加右括号。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明 |
...
@@ -163,7 +164,7 @@ or(): DataAbilityPredicates
...
@@ -163,7 +164,7 @@ or(): DataAbilityPredicates
将或条件添加到谓词中。
将或条件添加到谓词中。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明 |
...
@@ -187,7 +188,7 @@ and(): DataAbilityPredicates
...
@@ -187,7 +188,7 @@ and(): DataAbilityPredicates
将和条件添加到谓词中。
将和条件添加到谓词中。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明 |
...
@@ -211,7 +212,7 @@ contains(field: string, value: string): DataAbilityPredicates
...
@@ -211,7 +212,7 @@ contains(field: string, value: string): DataAbilityPredicates
配置谓词以匹配数据类型为string且value包含指定值的字段。
配置谓词以匹配数据类型为string且value包含指定值的字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -239,7 +240,7 @@ beginsWith(field: string, value: string): DataAbilityPredicates
...
@@ -239,7 +240,7 @@ beginsWith(field: string, value: string): DataAbilityPredicates
配置谓词以匹配数据类型为string且值以指定字符串开头的字段。
配置谓词以匹配数据类型为string且值以指定字符串开头的字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -267,7 +268,7 @@ endsWith(field: string, value: string): DataAbilityPredicates
...
@@ -267,7 +268,7 @@ endsWith(field: string, value: string): DataAbilityPredicates
配置谓词以匹配数据类型为string且值以指定字符串结尾的字段。
配置谓词以匹配数据类型为string且值以指定字符串结尾的字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -295,7 +296,7 @@ isNull(field: string): DataAbilityPredicates
...
@@ -295,7 +296,7 @@ isNull(field: string): DataAbilityPredicates
配置谓词以匹配值为null的字段。
配置谓词以匹配值为null的字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -322,7 +323,7 @@ isNotNull(field: string): DataAbilityPredicates
...
@@ -322,7 +323,7 @@ isNotNull(field: string): DataAbilityPredicates
配置谓词以匹配值不为null的指定字段。
配置谓词以匹配值不为null的指定字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -349,7 +350,7 @@ like(field: string, value: string): DataAbilityPredicates
...
@@ -349,7 +350,7 @@ like(field: string, value: string): DataAbilityPredicates
配置谓词以匹配数据类型为string且值类似于指定字符串的字段。
配置谓词以匹配数据类型为string且值类似于指定字符串的字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -377,7 +378,7 @@ glob(field: string, value: string): DataAbilityPredicates
...
@@ -377,7 +378,7 @@ glob(field: string, value: string): DataAbilityPredicates
配置谓词以匹配数据类型为string的指定字段。
配置谓词以匹配数据类型为string的指定字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -405,7 +406,7 @@ between(field: string, low: ValueType, high: ValueType): DataAbilityPredicates
...
@@ -405,7 +406,7 @@ between(field: string, low: ValueType, high: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType且value在指定范围内的指定字段。
配置谓词以匹配数据类型为ValueType且value在指定范围内的指定字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -434,7 +435,7 @@ notBetween(field: string, low: ValueType, high: ValueType): DataAbilityPredicate
...
@@ -434,7 +435,7 @@ notBetween(field: string, low: ValueType, high: ValueType): DataAbilityPredicate
配置谓词以匹配数据类型为ValueType且value超出给定范围的指定字段。
配置谓词以匹配数据类型为ValueType且value超出给定范围的指定字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -463,7 +464,7 @@ greaterThan(field: string, value: ValueType): DataAbilityPredicates
...
@@ -463,7 +464,7 @@ greaterThan(field: string, value: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType且值大于指定值的字段。
配置谓词以匹配数据类型为ValueType且值大于指定值的字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -491,7 +492,7 @@ lessThan(field: string, value: ValueType): DataAbilityPredicates
...
@@ -491,7 +492,7 @@ lessThan(field: string, value: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为valueType且value小于指定值的字段。
配置谓词以匹配数据类型为valueType且value小于指定值的字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -519,7 +520,7 @@ greaterThanOrEqualTo(field: string, value: ValueType): DataAbilityPredicates
...
@@ -519,7 +520,7 @@ greaterThanOrEqualTo(field: string, value: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType且value大于或等于指定值的字段。
配置谓词以匹配数据类型为ValueType且value大于或等于指定值的字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -547,7 +548,7 @@ lessThanOrEqualTo(field: string, value: ValueType): DataAbilityPredicates
...
@@ -547,7 +548,7 @@ lessThanOrEqualTo(field: string, value: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType且value小于或等于指定值的字段。
配置谓词以匹配数据类型为ValueType且value小于或等于指定值的字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -575,7 +576,7 @@ orderByAsc(field: string): DataAbilityPredicates
...
@@ -575,7 +576,7 @@ orderByAsc(field: string): DataAbilityPredicates
配置谓词以匹配其值按升序排序的列。
配置谓词以匹配其值按升序排序的列。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -602,7 +603,7 @@ orderByDesc(field: string): DataAbilityPredicates
...
@@ -602,7 +603,7 @@ orderByDesc(field: string): DataAbilityPredicates
配置谓词以匹配其值按降序排序的列。
配置谓词以匹配其值按降序排序的列。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -629,7 +630,7 @@ distinct(): DataAbilityPredicates
...
@@ -629,7 +630,7 @@ distinct(): DataAbilityPredicates
配置谓词以过滤重复记录并仅保留其中一个。
配置谓词以过滤重复记录并仅保留其中一个。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明 |
...
@@ -657,7 +658,7 @@ limitAs(value: number): DataAbilityPredicates
...
@@ -657,7 +658,7 @@ limitAs(value: number): DataAbilityPredicates
设置最大数据记录数的谓词。
设置最大数据记录数的谓词。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -684,7 +685,7 @@ offsetAs(rowOffset: number): DataAbilityPredicates
...
@@ -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
...
@@ -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
...
@@ -763,7 +764,7 @@ in(field: string, value: Array<ValueType>): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType数组且值在给定范围内的指定字段。
配置谓词以匹配数据类型为ValueType数组且值在给定范围内的指定字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -792,7 +793,7 @@ notIn(field: string, value: Array<ValueType>): DataAbilityPredicates
...
@@ -792,7 +793,7 @@ notIn(field: string, value: Array<ValueType>): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType数组且值不在给定范围内的指定字段。
配置谓词以匹配数据类型为ValueType数组且值不在给定范围内的指定字段。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -816,7 +817,7 @@ notIn(field: string, value: Array<ValueType>): DataAbilityPredicates
...
@@ -816,7 +817,7 @@ notIn(field: string, value: Array<ValueType>): DataAbilityPredicates
用于表示允许的数据字段类型。
用于表示允许的数据字段类型。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.DataShare.Core。
| 名称 | 说明 |
| 名称 | 说明 |
| ------- | -------------------- |
| ------- | -------------------- |
...
...
zh-cn/application-dev/reference/apis/js-apis-data-distributedobject.md
浏览文件 @
bdec4940
# 分布式数据对象
# 分布式数据对象
>
![icon-note.gif](public_sys-resources/icon-note.gif)
**说明:**
> **说明:**
> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
...
@@ -10,8 +10,6 @@
...
@@ -10,8 +10,6 @@
import
distributedObject
from
'
@ohos.data.distributedDataObject
'
;
import
distributedObject
from
'
@ohos.data.distributedDataObject
'
;
```
```
## distributedDataObject.createDistributedObject
## distributedDataObject.createDistributedObject
createDistributedObject(source: object): DistributedObject
createDistributedObject(source: object): DistributedObject
...
@@ -19,7 +17,7 @@ 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
...
@@ -46,7 +44,7 @@ genSessionId(): string
随机创建一个sessionId。
随机创建一个sessionId。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**系统能力
:**
SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明 |
...
@@ -70,7 +68,7 @@ setSessionId(sessionId?: string): boolean
...
@@ -70,7 +68,7 @@ setSessionId(sessionId?: string): boolean
设置同步的sessionId,当可信组网中有多个设备时,多个设备间的对象如果设置为同一个sessionId,就能自动同步。
设置同步的sessionId,当可信组网中有多个设备时,多个设备间的对象如果设置为同一个sessionId,就能自动同步。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**系统能力
:**
SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**参数:**
**参数:**
...
@@ -103,7 +101,7 @@ on(type: 'change', callback: Callback<{ sessionId: string, fields: Array<stri
...
@@ -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
...
@@ -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
...
@@ -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
...
@@ -188,7 +186,7 @@ off(type: 'status', callback?: Callback<{ sessionId: string, deviceId: string, s
当不再进行对象上下线监听时,使用此接口删除对象的上下线监听。
当不再进行对象上下线监听时,使用此接口删除对象的上下线监听。
**系统能力
**
:
SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**系统能力
:**
SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
...
zh-cn/application-dev/reference/apis/js-apis-data-rdb.md
浏览文件 @
bdec4940
此差异已折叠。
点击以展开。
zh-cn/application-dev/reference/apis/js-apis-data-resultset.md
浏览文件 @
bdec4940
# 结果集
# 结果集
>
![icon-note.gif](public_sys-resources/icon-note.gif)
**说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
...
@@ -25,7 +25,7 @@ promise.then((resultSet) => {
...
@@ -25,7 +25,7 @@ promise.then((resultSet) => {
### 属性
### 属性
**系统能力
**
:
以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
| 名称 | 参数类型 | 必填 | 说明 |
| 名称 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
...
@@ -46,7 +46,7 @@ getColumnIndex(columnName: string): number
...
@@ -46,7 +46,7 @@ getColumnIndex(columnName: string): number
根据指定的列名获取列索引。
根据指定的列名获取列索引。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -74,7 +74,7 @@ getColumnName(columnIndex: number): string
...
@@ -74,7 +74,7 @@ getColumnName(columnIndex: number): string
根据指定的列索引获取列名。
根据指定的列索引获取列名。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -100,7 +100,7 @@ goTo(offset:number): boolean
...
@@ -100,7 +100,7 @@ goTo(offset:number): boolean
向前或向后转至结果集的指定行,相对于其当前位置偏移。
向前或向后转至结果集的指定行,相对于其当前位置偏移。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -131,7 +131,7 @@ goToRow(position: number): boolean
...
@@ -131,7 +131,7 @@ goToRow(position: number): boolean
转到结果集的指定行。
转到结果集的指定行。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -163,7 +163,7 @@ goToFirstRow(): boolean
...
@@ -163,7 +163,7 @@ goToFirstRow(): boolean
转到结果集的第一行。
转到结果集的第一行。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明 |
...
@@ -189,7 +189,7 @@ goToLastRow(): boolean
...
@@ -189,7 +189,7 @@ goToLastRow(): boolean
转到结果集的最后一行。
转到结果集的最后一行。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明 |
...
@@ -215,7 +215,7 @@ goToNextRow(): boolean
...
@@ -215,7 +215,7 @@ goToNextRow(): boolean
转到结果集的下一行。
转到结果集的下一行。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明 |
...
@@ -241,7 +241,7 @@ goToPreviousRow(): boolean
...
@@ -241,7 +241,7 @@ goToPreviousRow(): boolean
转到结果集的上一行。
转到结果集的上一行。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明 |
...
@@ -267,7 +267,7 @@ getBlob(columnIndex: number): Uint8Array
...
@@ -267,7 +267,7 @@ getBlob(columnIndex: number): Uint8Array
以字节数组的形式获取当前行中指定列的值。
以字节数组的形式获取当前行中指定列的值。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -291,7 +291,7 @@ getString(columnIndex: number): string
...
@@ -291,7 +291,7 @@ getString(columnIndex: number): string
以字符串形式获取当前行中指定列的值。
以字符串形式获取当前行中指定列的值。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -315,7 +315,7 @@ getLong(columnIndex: number): number
...
@@ -315,7 +315,7 @@ getLong(columnIndex: number): number
以Long形式获取当前行中指定列的值。
以Long形式获取当前行中指定列的值。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -339,7 +339,7 @@ getDouble(columnIndex: number): number
...
@@ -339,7 +339,7 @@ getDouble(columnIndex: number): number
以double形式获取当前行中指定列的值。
以double形式获取当前行中指定列的值。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -363,7 +363,7 @@ isColumnNull(columnIndex: number): boolean
...
@@ -363,7 +363,7 @@ isColumnNull(columnIndex: number): boolean
检查当前行中指定列的值是否为null。
检查当前行中指定列的值是否为null。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -387,7 +387,7 @@ close(): void
...
@@ -387,7 +387,7 @@ close(): void
关闭结果集。
关闭结果集。
**系统能力
**
:
SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力
:**
SystemCapability.DistributedDataManager.RelationalStore.Core。
**示例:**
**示例:**
```
js
```
js
...
...
zh-cn/application-dev/reference/apis/js-apis-data-storage.md
浏览文件 @
bdec4940
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
轻量级存储为应用提供key-value键值型的文件数据处理能力,支持应用对数据进行轻量级存储及查询。数据存储形式为键值对,键的类型为字符串型,值的存储数据类型包括数字型、字符型、布尔型。
轻量级存储为应用提供key-value键值型的文件数据处理能力,支持应用对数据进行轻量级存储及查询。数据存储形式为键值对,键的类型为字符串型,值的存储数据类型包括数字型、字符型、布尔型。
>
![icon-note.gif](public_sys-resources/icon-note.gif)
**说明:**
> **说明:**
>
>
>
-
本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
## 导入模块
...
@@ -16,7 +16,7 @@ import dataStorage from '@ohos.data.storage';
...
@@ -16,7 +16,7 @@ import dataStorage from '@ohos.data.storage';
## 常量
## 常量
**系统能力
**
:
以下各项对应的系统能力均为SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
以下各项对应的系统能力均为SystemCapability.DistributedDataManager.Preferences.Core
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- | -------- |
...
@@ -28,9 +28,9 @@ import dataStorage from '@ohos.data.storage';
...
@@ -28,9 +28,9 @@ import dataStorage from '@ohos.data.storage';
getStorageSync(path: string): Storage
getStorageSync(path: string): Storage
读取指定文件,将数据加载到Storage实例,用于数据操作
,此方法为同步方法
。
读取指定文件,将数据加载到Storage实例,用于数据操作。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -65,9 +65,9 @@ getStorageSync(path: string): Storage
...
@@ -65,9 +65,9 @@ getStorageSync(path: string): Storage
getStorage(path: string, callback: AsyncCallback
<
Storage
>
): void
getStorage(path: string, callback: AsyncCallback
<
Storage
>
): void
读取指定文件,将数据加载到Storage实例,用于数据操作,使用callback
形式返回结果
。
读取指定文件,将数据加载到Storage实例,用于数据操作,使用callback
方式返回结果,此方法为异步方法
。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -103,9 +103,9 @@ getStorage(path: string, callback: AsyncCallback<Storage>): void
...
@@ -103,9 +103,9 @@ getStorage(path: string, callback: AsyncCallback<Storage>): void
getStorage(path: string): Promise
<
Storage
>
getStorage(path: string): Promise
<
Storage
>
读取指定文件,将数据加载到Storage实例,用于数据操作,使用Promise方式
作
为异步方法。
读取指定文件,将数据加载到Storage实例,用于数据操作,使用Promise方式
返回结果,此方法
为异步方法。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -144,9 +144,9 @@ getStorage(path: string): Promise<Storage>
...
@@ -144,9 +144,9 @@ getStorage(path: string): Promise<Storage>
deleteStorageSync(path: string): void
deleteStorageSync(path: string): void
从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题
,此方法为同步方法
。
从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -154,7 +154,7 @@ deleteStorageSync(path: string): void
...
@@ -154,7 +154,7 @@ deleteStorageSync(path: string): void
| path | string | 是 | 应用程序内部数据存储路径。 |
| path | string | 是 | 应用程序内部数据存储路径。 |
**示例:**
**示例:**
```
```
js
dataStorage
.
deleteStorageSync
(
path
+
'
/mystore
'
)
dataStorage
.
deleteStorageSync
(
path
+
'
/mystore
'
)
```
```
...
@@ -163,9 +163,9 @@ deleteStorageSync(path: string): void
...
@@ -163,9 +163,9 @@ deleteStorageSync(path: string): void
deleteStorage(path: string, callback: AsyncCallback
<
void
>
): void
deleteStorage(path: string, callback: AsyncCallback
<
void
>
): void
从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,使用callback方式
作
为异步方法。
从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,使用callback方式
返回结果,此方法
为异步方法。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -189,9 +189,9 @@ deleteStorage(path: string, callback: AsyncCallback<void>): void
...
@@ -189,9 +189,9 @@ deleteStorage(path: string, callback: AsyncCallback<void>): void
deleteStorage(path: string): Promise
<
void
>
deleteStorage(path: string): Promise
<
void
>
从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,使用promise方式
作
为异步方法。
从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,使用promise方式
返回结果,此方法
为异步方法。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -220,9 +220,7 @@ removeStorageFromCacheSync(path: string): void
...
@@ -220,9 +220,7 @@ removeStorageFromCacheSync(path: string): void
从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。
从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。
此方法为同步方法。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力**
:SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -239,11 +237,9 @@ removeStorageFromCacheSync(path: string): void
...
@@ -239,11 +237,9 @@ removeStorageFromCacheSync(path: string): void
removeStorageFromCache(path: string, callback: AsyncCallback
<
void
>
): void
removeStorageFromCache(path: string, callback: AsyncCallback
<
void
>
): void
从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。
从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。使用callback方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -267,11 +263,9 @@ removeStorageFromCache(path: string, callback: AsyncCallback<void>): void
...
@@ -267,11 +263,9 @@ removeStorageFromCache(path: string, callback: AsyncCallback<void>): void
removeStorageFromCache(path: string): Promise
<
void
>
removeStorageFromCache(path: string): Promise
<
void
>
从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。
从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。使用Promise方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -305,9 +299,7 @@ getSync(key: string, defValue: ValueType): ValueType
...
@@ -305,9 +299,7 @@ getSync(key: string, defValue: ValueType): ValueType
获取键对应的值,如果值为null或者非默认值类型,返回默认数据。
获取键对应的值,如果值为null或者非默认值类型,返回默认数据。
此方法为同步方法。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力**
:SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -331,11 +323,9 @@ getSync(key: string, defValue: ValueType): ValueType
...
@@ -331,11 +323,9 @@ getSync(key: string, defValue: ValueType): ValueType
get(key: string, defValue: ValueType, callback: AsyncCallback
<
ValueType
>
): void
get(key: string, defValue: ValueType, callback: AsyncCallback
<
ValueType
>
): void
获取键对应的值,如果值为null或者非默认值类型,返回默认数据。
获取键对应的值,如果值为null或者非默认值类型,返回默认数据。
使用callback方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力**
:SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -360,11 +350,9 @@ get(key: string, defValue: ValueType, callback: AsyncCallback<ValueType>):
...
@@ -360,11 +350,9 @@ get(key: string, defValue: ValueType, callback: AsyncCallback<ValueType>):
get(key: string, defValue: ValueType): Promise
<
ValueType
>
get(key: string, defValue: ValueType): Promise
<
ValueType
>
获取键对应的值,如果值为null或者非默认值类型,返默认数据。
获取键对应的值,如果值为null或者非默认值类型,返默认数据。使用Promise方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
...
@@ -395,9 +383,7 @@ putSync(key: string, value: ValueType): void
...
@@ -395,9 +383,7 @@ putSync(key: string, value: ValueType): void
首先获取指定文件对应的Storage实例,然后借助Storage API将数据写入Storage实例,通过flush或者flushSync将Storage实例持久化。
首先获取指定文件对应的Storage实例,然后借助Storage API将数据写入Storage实例,通过flush或者flushSync将Storage实例持久化。
此方法为同步方法。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力**
:SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -415,11 +401,9 @@ putSync(key: string, value: ValueType): void
...
@@ -415,11 +401,9 @@ putSync(key: string, value: ValueType): void
put(key: string, value: ValueType, callback: AsyncCallback
<
void
>
): 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
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -444,11 +428,9 @@ put(key: string, value: ValueType, callback: AsyncCallback<void>): void
...
@@ -444,11 +428,9 @@ put(key: string, value: ValueType, callback: AsyncCallback<void>): void
put(key: string, value: ValueType): Promise
<
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
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -478,9 +460,7 @@ hasSync(key: string): boolean
...
@@ -478,9 +460,7 @@ hasSync(key: string): boolean
检查存储对象是否包含名为给定key的存储。
检查存储对象是否包含名为给定key的存储。
此方法为同步方法。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力**
:SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -505,11 +485,9 @@ hasSync(key: string): boolean
...
@@ -505,11 +485,9 @@ hasSync(key: string): boolean
has(key: string, callback: AsyncCallback
<
boolean
>
): boolean
has(key: string, callback: AsyncCallback
<
boolean
>
): boolean
检查存储对象是否包含名为给定key的存储。
检查存储对象是否包含名为给定key的存储。使用callback方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -540,11 +518,9 @@ has(key: string, callback: AsyncCallback<boolean>): boolean
...
@@ -540,11 +518,9 @@ has(key: string, callback: AsyncCallback<boolean>): boolean
has(key: string): Promise
<
boolean
>
has(key: string): Promise
<
boolean
>
检查存储对象是否包含名为给定key的存储。
检查存储对象是否包含名为给定key的存储。
使用Promise方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力**
:SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -575,9 +551,7 @@ deleteSync(key: string): void
...
@@ -575,9 +551,7 @@ deleteSync(key: string): void
从存储对象中删除名为给定key的存储。
从存储对象中删除名为给定key的存储。
此方法为同步方法。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力**
:SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -590,15 +564,13 @@ deleteSync(key: string): void
...
@@ -590,15 +564,13 @@ deleteSync(key: string): void
```
```
### delete
j
### delete
delete(key: string, callback: AsyncCallback
<
void
>
): void
delete(key: string, callback: AsyncCallback
<
void
>
): void
从存储对象中删除名为给定key的存储。
从存储对象中删除名为给定key的存储。使用callback方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -622,11 +594,9 @@ delete(key: string, callback: AsyncCallback<void>): void
...
@@ -622,11 +594,9 @@ delete(key: string, callback: AsyncCallback<void>): void
delete(key: string): Promise
<
void
>
delete(key: string): Promise
<
void
>
从存储对象删除名为给定key的存储。
从存储对象删除名为给定key的存储。使用Promise方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -655,9 +625,7 @@ flushSync(): void
...
@@ -655,9 +625,7 @@ flushSync(): void
将当前storage对象中的修改保存到当前的storage,并同步存储到文件中。
将当前storage对象中的修改保存到当前的storage,并同步存储到文件中。
此方法为同步方法。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力**
:SystemCapability.DistributedDataManager.Preferences.Core
**示例:**
**示例:**
```
js
```
js
...
@@ -669,11 +637,9 @@ flushSync(): void
...
@@ -669,11 +637,9 @@ flushSync(): void
flush(callback: AsyncCallback
<
void
>
): void
flush(callback: AsyncCallback
<
void
>
): void
将当前storage对象中的修改保存到当前的storage,并异步存储到文件中。
将当前storage对象中的修改保存到当前的storage,并异步存储到文件中。使用callback方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -696,11 +662,9 @@ flush(callback: AsyncCallback<void>): void
...
@@ -696,11 +662,9 @@ flush(callback: AsyncCallback<void>): void
flush(): Promise
<
void
>
flush(): Promise
<
void
>
将当前storage对象中的修改保存到当前的storage,并异步存储到文件中。
将当前storage对象中的修改保存到当前的storage,并异步存储到文件中。
使用Promise方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力**
:SystemCapability.DistributedDataManager.Preferences.Core
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明 |
...
@@ -724,9 +688,7 @@ clearSync(): void
...
@@ -724,9 +688,7 @@ clearSync(): void
清除此存储对象中的所有存储。
清除此存储对象中的所有存储。
此方法为同步方法。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力**
:SystemCapability.DistributedDataManager.Preferences.Core
**示例:**
**示例:**
```
js
```
js
...
@@ -738,11 +700,9 @@ clearSync(): void
...
@@ -738,11 +700,9 @@ clearSync(): void
clear(callback: AsyncCallback
<
void
>
): void
clear(callback: AsyncCallback
<
void
>
): void
清除此存储对象中的所有存储。
清除此存储对象中的所有存储。使用callback方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -765,11 +725,9 @@ clear(callback: AsyncCallback<void>): void
...
@@ -765,11 +725,9 @@ clear(callback: AsyncCallback<void>): void
clear(): Promise
<
void
>
clear(): Promise
<
void
>
清除此存储对象中的所有存储。
清除此存储对象中的所有存储。使用Promise方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明 |
...
@@ -793,7 +751,7 @@ on(type: 'change', callback: Callback<StorageObserver>): void
...
@@ -793,7 +751,7 @@ on(type: 'change', callback: Callback<StorageObserver>): void
订阅数据变更者类需要实现StorageObserver接口,订阅的key的值发生变更后,在执行flush/flushSync方法后,callback方法会被回调。
订阅数据变更者类需要实现StorageObserver接口,订阅的key的值发生变更后,在执行flush/flushSync方法后,callback方法会被回调。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 说明 |
| 参数名 | 类型 | 说明 |
...
@@ -818,7 +776,7 @@ off(type: 'change', callback: Callback<StorageObserver>): void
...
@@ -818,7 +776,7 @@ off(type: 'change', callback: Callback<StorageObserver>): void
当不再进行订阅数据变更时,使用此接口取消订阅。
当不再进行订阅数据变更时,使用此接口取消订阅。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
| 参数名 | 类型 | 说明 |
| 参数名 | 类型 | 说明 |
...
@@ -837,7 +795,7 @@ off(type: 'change', callback: Callback<StorageObserver>): void
...
@@ -837,7 +795,7 @@ off(type: 'change', callback: Callback<StorageObserver>): void
## StorageObserver
## StorageObserver
**系统能力
**
:
以下各项对应的系统能力均为SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
以下各项对应的系统能力均为SystemCapability.DistributedDataManager.Preferences.Core
| 名称 | 参数类型 | 必填 | 说明 |
| 名称 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
...
@@ -847,7 +805,7 @@ off(type: 'change', callback: Callback<StorageObserver>): void
...
@@ -847,7 +805,7 @@ off(type: 'change', callback: Callback<StorageObserver>): void
用于表示允许的数据字段类型。
用于表示允许的数据字段类型。
**系统能力
**
:
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力
:**
SystemCapability.DistributedDataManager.Preferences.Core
| 名称 | 说明 |
| 名称 | 说明 |
| ------- | -------------------- |
| ------- | -------------------- |
...
...
zh-cn/application-dev/reference/apis/js-apis-display.md
浏览文件 @
bdec4940
# 屏幕属性
# 屏幕属性
>
![icon-note.gif](public_sys-resources/icon-note.gif)
**说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
## 导入模块
...
@@ -14,7 +14,7 @@ import display from '@ohos.display';
...
@@ -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';
...
@@ -31,7 +31,7 @@ import display from '@ohos.display';
描述display对象的属性。
描述display对象的属性。
**系统能力
**
:
以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。
**系统能力
:**
以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- | -------- |
...
@@ -56,7 +56,7 @@ getDefaultDisplay(callback: AsyncCallback<Display>): void
...
@@ -56,7 +56,7 @@ getDefaultDisplay(callback: AsyncCallback<Display>): void
获取当前默认的display对象。
获取当前默认的display对象。
**系统能力
**
:
SystemCapability.WindowManager.WindowManager.Core
**系统能力
:**
SystemCapability.WindowManager.WindowManager.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -82,7 +82,7 @@ getDefaultDisplay(): Promise<Display>
...
@@ -82,7 +82,7 @@ getDefaultDisplay(): Promise<Display>
获取当前默认的display对象。
获取当前默认的display对象。
**系统能力
**
:
SystemCapability.WindowManager.WindowManager.Core
**系统能力
:**
SystemCapability.WindowManager.WindowManager.Core
**返回值:**
**返回值:**
...
@@ -107,7 +107,7 @@ getAllDisplay(callback: AsyncCallback<Array<Display>>): void
...
@@ -107,7 +107,7 @@ getAllDisplay(callback: AsyncCallback<Array<Display>>): void
获取当前所有的display对象。
获取当前所有的display对象。
**系统能力
**
:
SystemCapability.WindowManager.WindowManager.Core
**系统能力
:**
SystemCapability.WindowManager.WindowManager.Core
**参数:**
**参数:**
...
@@ -133,7 +133,7 @@ getAllDisplay(): Promise<Array<Display>>
...
@@ -133,7 +133,7 @@ getAllDisplay(): Promise<Array<Display>>
获取当前所有的display对象。
获取当前所有的display对象。
**系统能力
**
:
SystemCapability.WindowManager.WindowManager.Core
**系统能力
:**
SystemCapability.WindowManager.WindowManager.Core
**返回值:**
**返回值:**
...
@@ -158,7 +158,7 @@ on(type: 'add'|'remove'|'change', callback: Callback<number>): void
...
@@ -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
...
@@ -182,7 +182,7 @@ off(type: 'add'|'remove'|'change', callback?: Callback<number>): void
关闭监听。
关闭监听。
**系统能力
**
:
SystemCapability.WindowManager.WindowManager.Core
**系统能力
:**
SystemCapability.WindowManager.WindowManager.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
...
zh-cn/application-dev/reference/apis/js-apis-distributed-data.md
浏览文件 @
bdec4940
此差异已折叠。
点击以展开。
zh-cn/application-dev/reference/apis/js-apis-screenshot.md
浏览文件 @
bdec4940
# 屏幕截图
# 屏幕截图
>
![icon-note.gif](public_sys-resources/icon-note.gif)
**说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
## 导入模块
...
@@ -13,7 +13,7 @@ import screenshot from '@ohos.screenshot';
...
@@ -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';
...
@@ -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';
...
@@ -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>)
...
@@ -54,7 +54,7 @@ save(options?: ScreenshotOptions, callback: AsyncCallback<image.PixelMap>)
获取屏幕截图。
获取屏幕截图。
**系统能力
**
:
SystemCapability.WindowManager.WindowManager.Core
**系统能力
:**
SystemCapability.WindowManager.WindowManager.Core
**需要权限**
:ohos.permission.CAPTURE_SCREEN
**需要权限**
:ohos.permission.CAPTURE_SCREEN
...
@@ -94,15 +94,15 @@ save(options?: ScreenshotOptions): Promise<image.PixelMap>
...
@@ -94,15 +94,15 @@ save(options?: ScreenshotOptions): Promise<image.PixelMap>
获取屏幕截图。
获取屏幕截图。
**系统能力
**
:
SystemCapability.WindowManager.WindowManager.Core
**系统能力
:**
SystemCapability.WindowManager.WindowManager.Core
**需要权限**
:ohos.permission.CAPTURE_SCREEN
**需要权限**
:ohos.permission.CAPTURE_SCREEN
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| ------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
| ------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
| options |
[
ScreenshotOptions
](
#screenshotoptions
)
| 否 | 该类型的参数包含screenRect,imageSize,
rotation三个参数,需要分别设置这三个参数。 |
| options |
[
ScreenshotOptions
](
#screenshotoptions
)
| 否 | 该类型的参数包含screenRect、imageSize、
rotation三个参数,需要分别设置这三个参数。 |
**返回值:**
**返回值:**
...
...
zh-cn/application-dev/reference/apis/js-apis-system-storage.md
浏览文件 @
bdec4940
# 数据存储
# 数据存储
>
![icon-note.gif](public_sys-resources/icon-note.gif)
**说明:**
> **说明:**
>
>
> - 从API Version 6开始,该模块不再维护,可以使用模块[`@ohos.data.storage`](js-apis-data-storage.md)。
> - 从API Version 6开始,该模块不再维护,可以使用模块[`@ohos.data.storage`](js-apis-data-storage.md)。
>
>
...
@@ -21,7 +21,7 @@ get(Object): void
...
@@ -21,7 +21,7 @@ get(Object): void
通过索引读取缓存中存储的值。
通过索引读取缓存中存储的值。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
...
@@ -61,7 +61,7 @@ set(Object): void
...
@@ -61,7 +61,7 @@ set(Object): void
修改缓存中索引对应的值。
修改缓存中索引对应的值。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
...
@@ -99,7 +99,7 @@ clear(Object): void
...
@@ -99,7 +99,7 @@ clear(Object): void
清空缓存中存储的键值对。
清空缓存中存储的键值对。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
...
@@ -133,7 +133,7 @@ delete(Object): void
...
@@ -133,7 +133,7 @@ delete(Object): void
删除缓存中索引对应的键值对。
删除缓存中索引对应的键值对。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
**参数:**
...
...
zh-cn/application-dev/reference/apis/js-apis-usb.md
浏览文件 @
bdec4940
# USB管理
# USB管理
>
![icon-note.gif](public_sys-resources/icon-note.gif)
**说明:**
> **说明:**
> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
## 导入模块
...
@@ -15,9 +15,10 @@ getDevices(): Array<Readonly<USBDevice>>
...
@@ -15,9 +15,10 @@ getDevices(): Array<Readonly<USBDevice>>
获取USB设备列表。
获取USB设备列表。
**系统能力
**
:
SystemCapability.USB.USBManager
**系统能力
:**
SystemCapability.USB.USBManager
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| Array
<
Readonly
<
[USBDevice](#usbdevice)
>>
| 设备信息列表。 |
| Array
<
Readonly
<
[USBDevice](#usbdevice)
>>
| 设备信息列表。 |
...
@@ -87,7 +88,7 @@ connectDevice(device: USBDevice): Readonly<USBDevicePipe>
...
@@ -87,7 +88,7 @@ connectDevice(device: USBDevice): Readonly<USBDevicePipe>
需要调用
[
usb.getDevices
](
#usbgetdevices
)
获取设备信息以及device;再调用
[
usb.requestRight
](
#usbrequestright
)
获取设备请求权限。
需要调用
[
usb.getDevices
](
#usbgetdevices
)
获取设备信息以及device;再调用
[
usb.requestRight
](
#usbrequestright
)
获取设备请求权限。
**系统能力
**
:
SystemCapability.USB.USBManager
**系统能力
:**
SystemCapability.USB.USBManager
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -112,7 +113,7 @@ hasRight(deviceName: string): boolean
...
@@ -112,7 +113,7 @@ hasRight(deviceName: string): boolean
判断是否有权访问该设备。
判断是否有权访问该设备。
**系统能力
**
:
SystemCapability.USB.USBManager
**系统能力
:**
SystemCapability.USB.USBManager
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -138,7 +139,7 @@ requestRight(deviceName: string): Promise<boolean>
...
@@ -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
...
@@ -167,7 +168,7 @@ claimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): numbe
需要调用
[
usb.getDevices
](
#usbgetdevices
)
获取设备信息以及interfaces;调用
[
usb.requestRight
](
#usbrequestright
)
获取设备请求权限;调用
[
usb.connectDevice
](
#usbconnectdevice
)
接口得到devicepipe作为参数。
需要调用
[
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
...
@@ -196,7 +197,7 @@ releaseInterface(pipe: USBDevicePipe, iface: USBInterface): number
需要调用
[
usb.claimInterface
](
#usbclaiminterface
)
先获取接口,才能使用此方法释放接口。
需要调用
[
usb.claimInterface
](
#usbclaiminterface
)
先获取接口,才能使用此方法释放接口。
**系统能力
**
:
SystemCapability.USB.USBManager
**系统能力
:**
SystemCapability.USB.USBManager
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -224,7 +225,7 @@ setConfiguration(pipe: USBDevicePipe, config: USBConfig): number
...
@@ -224,7 +225,7 @@ setConfiguration(pipe: USBDevicePipe, config: USBConfig): number
需要调用
[
usb.getDevices
](
#usbgetdevices
)
获取设备信息以及config;调用
[
usb.requestRight
](
#usbrequestright
)
获取设备请求权限;调用
[
usb.connectDevice
](
#usbconnectdevice
)
得到devicepipe作为参数。
需要调用
[
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
...
@@ -252,7 +253,7 @@ setInterface(pipe: USBDevicePipe, iface: USBInterface): number
需要调用
[
usb.getDevices
](
#usbgetdevices
)
获取设备列表以及interfaces;调用
[
usb.requestRight
](
#usbrequestright
)
获取设备请求权限;调用
[
usb.connectDevice
](
#usbconnectdevice
)
得到devicepipe作为参数。
需要调用
[
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
...
@@ -280,7 +281,7 @@ getRawDescriptor(pipe: USBDevicePipe): Uint8Array
需要调用
[
usb.getDevices
](
#usbgetdevices
)
获取设备列表;调用
[
usb.requestRight
](
#usbrequestright
)
获取设备请求权限;调用
[
usb.connectDevice
](
#usbconnectdevice
)
接口得到devicepipe作为参数。
需要调用
[
usb.getDevices
](
#usbgetdevices
)
获取设备列表;调用
[
usb.requestRight
](
#usbrequestright
)
获取设备请求权限;调用
[
usb.connectDevice
](
#usbconnectdevice
)
接口得到devicepipe作为参数。
**系统能力
**
:
SystemCapability.USB.USBManager
**系统能力
:**
SystemCapability.USB.USBManager
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
@@ -306,17 +307,18 @@ getFileDescriptor(pipe: USBDevicePipe): number
...
@@ -306,17 +307,18 @@ getFileDescriptor(pipe: USBDevicePipe): number
需要调用
[
usb.getDevices
](
#usbgetdevices
)
获取设备列表;调用
[
usb.requestRight
](
#usbrequestright
)
获取设备请求权限;调用
[
usb.connectDevice
](
#usbconnectdevice
)
接口得到devicepipe作为参数。
需要调用
[
usb.getDevices
](
#usbgetdevices
)
获取设备列表;调用
[
usb.requestRight
](
#usbrequestright
)
获取设备请求权限;调用
[
usb.connectDevice
](
#usbconnectdevice
)
接口得到devicepipe作为参数。
**系统能力
**
:
SystemCapability.USB.USBManager
**系统能力
:**
SystemCapability.USB.USBManager
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| pipe |
[
USBDevicePipe
](
#usbdevicepipe
)
| 是 | 用于确定总线号和设备地址。 |
| pipe |
[
USBDevicePipe
](
#usbdevicepipe
)
| 是 | 用于确定总线号和设备地址。 |
-
返回值:
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| 类型 | 说明 |
| number | 返回设备对应的文件描述符。 |
| -------- | -------- |
| number | 返回设备对应的文件描述符。 |
**示例:**
**示例:**
```
js
```
js
...
@@ -332,7 +334,7 @@ controlTransfer(pipe: USBDevicePipe, contrlparam: USBControlParams, timeout?: nu
...
@@ -332,7 +334,7 @@ controlTransfer(pipe: USBDevicePipe, contrlparam: USBControlParams, timeout?: nu
需要调用
[
usb.getDevices
](
#usbgetdevices
)
获取设备列表;调用
[
usb.requestRight
](
#usbrequestright
)
获取设备请求权限;调用
[
usb.connectDevice
](
#usbconnectdevice
)
接口得到devicepipe作为参数。
需要调用
[
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
...
@@ -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接口。
需要调用
[
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
...
@@ -396,7 +398,7 @@ closePipe(pipe: USBDevicePipe): number
需要调用
[
usb.getDevices
](
#usbgetdevices
)
获取设备列表;调用
[
usb.requestRight
](
#usbrequestright
)
获取设备请求权限;调用
[
usb.connectDevice
](
#usbconnectdevice
)
得到devicepipe作为参数。
需要调用
[
usb.getDevices
](
#usbgetdevices
)
获取设备列表;调用
[
usb.requestRight
](
#usbrequestright
)
获取设备请求权限;调用
[
usb.connectDevice
](
#usbconnectdevice
)
得到devicepipe作为参数。
**系统能力
**
:
SystemCapability.USB.USBManager
**系统能力
:**
SystemCapability.USB.USBManager
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
...
...
zh-cn/application-dev/reference/apis/js-apis-webgl.md
浏览文件 @
bdec4940
# webgl
# webgl
>
![icon-note.gif](public_sys-resources/icon-note.gif)
**说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
...
@@ -34,7 +34,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
...
@@ -34,7 +34,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
## Type
## Type
**系统能力
**
:
以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。
**系统能力
:**
以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。
**表1**
Type
**表1**
Type
...
@@ -62,7 +62,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
...
@@ -62,7 +62,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
## Interface
## Interface
**系统能力
**
:
以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。
**系统能力
:**
以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。
**表2**
Interface
**表2**
Interface
...
...
zh-cn/application-dev/reference/apis/js-apis-webgl2.md
浏览文件 @
bdec4940
# webgl2
# webgl2
>
![icon-note.gif](public_sys-resources/icon-note.gif)
**说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
...
@@ -34,7 +34,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
...
@@ -34,7 +34,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
## Type
## Type
**系统能力
**
:
以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL2。
**系统能力
:**
以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL2。
**表1**
Type
**表1**
Type
...
@@ -48,7 +48,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
...
@@ -48,7 +48,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
## Interface
## Interface
**系统能力
**
:
以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL2。
**系统能力
:**
以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL2。
**表2**
Interface
**表2**
Interface
...
...
zh-cn/application-dev/reference/apis/js-apis-window.md
浏览文件 @
bdec4940
此差异已折叠。
点击以展开。
zh-cn/application-dev/webgl/webgl-guidelines.md
浏览文件 @
bdec4940
...
@@ -699,3 +699,9 @@ WebGL主要帮助开发者在前端开发中完成图形图像的相关处理,
...
@@ -699,3 +699,9 @@ WebGL主要帮助开发者在前端开发中完成图形图像的相关处理,
**图2**
点击按钮绘制彩色三角形的效果图
**图2**
点击按钮绘制彩色三角形的效果图
![
zh-cn_image_0000001192429306
](
figures/zh-cn_image_0000001192429306.gif
)
![
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
)
zh-cn/application-dev/windowmanager/screenshot-guidelines.md
浏览文件 @
bdec4940
...
@@ -37,4 +37,4 @@ screenshot.save(ScreenshotOptions).then((image) => {
...
@@ -37,4 +37,4 @@ 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
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录