Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
df89a466
D
Docs
项目概览
OpenHarmony
/
Docs
接近 2 年 前同步成功
通知
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看板
提交
df89a466
编写于
9月 13, 2022
作者:
A
Annie_wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update docs
Signed-off-by:
N
Annie_wang
<
annie.wangli@huawei.com
>
上级
03337111
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
38 addition
and
38 deletion
+38
-38
en/application-dev/reference/apis/js-apis-distributed-data.md
...pplication-dev/reference/apis/js-apis-distributed-data.md
+38
-38
未找到文件。
en/application-dev/reference/apis/js-apis-distributed-data.md
浏览文件 @
df89a466
...
@@ -582,8 +582,8 @@ Subscribes to service status changes.
...
@@ -582,8 +582,8 @@ Subscribes to service status changes.
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event | string | Yes | Event to subscribe to. The value is
**distributedDataServiceDie**
, which indicates
service status changes
.|
| event | string | Yes | Event to subscribe to. The value is
**distributedDataServiceDie**
, which indicates
a service status change event
.|
| deathCallback | Callback
<
void
>
| Yes | Callback invoked to return
service status changes
.|
| deathCallback | Callback
<
void
>
| Yes | Callback invoked to return
a service status change event
.|
**Example**
**Example**
...
@@ -614,8 +614,8 @@ Unsubscribes from service status changes.
...
@@ -614,8 +614,8 @@ Unsubscribes from service status changes.
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event | string | Yes | Event to unsubscribe from. The value is
**distributedDataServiceDie**
, which indicates
service status changes
.|
| event | string | Yes | Event to unsubscribe from. The value is
**distributedDataServiceDie**
, which indicates
a service status change event
.|
| deathCallback | Callback
<
void
>
| No | Callback used to return
service status changes
.|
| deathCallback | Callback
<
void
>
| No | Callback used to return
a service status change event
.|
**Example**
**Example**
...
@@ -2383,7 +2383,7 @@ try {
...
@@ -2383,7 +2383,7 @@ try {
on(event: 'dataChange', type: SubscribeType, listener: Callback
<
ChangeNotification
>
): void
on(event: 'dataChange', type: SubscribeType, listener: Callback
<
ChangeNotification
>
): void
Subscribes to data change
notification
s of the specified type.
Subscribes to data changes of the specified type.
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
...
@@ -2391,9 +2391,9 @@ Subscribes to data change notifications of the specified type.
...
@@ -2391,9 +2391,9 @@ Subscribes to data change notifications of the specified type.
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event |string | Yes |Event to subscribe to. The value is
**dataChange**
, which indicates
data changes
. |
| event |string | Yes |Event to subscribe to. The value is
**dataChange**
, which indicates
a data change event
. |
| type |
[
SubscribeType
](
#subscribetype
)
| Yes |Type of data change
s
. |
| type |
[
SubscribeType
](
#subscribetype
)
| Yes |Type of data change. |
| listener |Callback
<
[ChangeNotification](#changenotification)
>
| Yes |Callback
used to return data changes
.|
| listener |Callback
<
[ChangeNotification](#changenotification)
>
| Yes |Callback
invoked to return a data change event
.|
**Example**
**Example**
...
@@ -2409,7 +2409,7 @@ kvStore.on('dataChange', distributedData.SubscribeType.SUBSCRIBE_TYPE_LOCAL, fun
...
@@ -2409,7 +2409,7 @@ kvStore.on('dataChange', distributedData.SubscribeType.SUBSCRIBE_TYPE_LOCAL, fun
on(event: 'syncComplete', syncCallback: Callback
<
Array
<
[string, number]
>>
): void
on(event: 'syncComplete', syncCallback: Callback
<
Array
<
[string, number]
>>
): void
Subscribes to
data
synchronization complete events.
Subscribes to synchronization complete events.
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
...
@@ -2417,8 +2417,8 @@ Subscribes to data synchronization complete events.
...
@@ -2417,8 +2417,8 @@ Subscribes to data synchronization complete events.
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event |string | Yes |Event to subscribe to. The value is
**syncComplete**
, which indicates
completion of a data synchronization
. |
| event |string | Yes |Event to subscribe to. The value is
**syncComplete**
, which indicates
a synchronization complete event
. |
| syncCallback |Callback
<
Array
<
[string, number]
>>
| Yes |Callback
used to return the data synchronization resul
t. |
| syncCallback |Callback
<
Array
<
[string, number]
>>
| Yes |Callback
invoked to return the a synchronization complete even
t. |
**Example**
**Example**
...
@@ -2433,7 +2433,7 @@ kvStore.on('syncComplete', function (data) {
...
@@ -2433,7 +2433,7 @@ kvStore.on('syncComplete', function (data) {
off(event:'dataChange', listener?: Callback
<
ChangeNotification
>
): void
off(event:'dataChange', listener?: Callback
<
ChangeNotification
>
): void
Unsubscribes from data change
notification
s.
Unsubscribes from data changes.
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
...
@@ -2441,8 +2441,8 @@ Unsubscribes from data change notifications.
...
@@ -2441,8 +2441,8 @@ Unsubscribes from data change notifications.
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event |string | Yes |Event to unsubscribe from. The value is
**dataChange**
, which indicates
data changes
. |
| event |string | Yes |Event to unsubscribe from. The value is
**dataChange**
, which indicates
a data change event
. |
| listener |Callback
<
[ChangeNotification](#changenotification)
>
|No |Callback used to return
data changes
.|
| listener |Callback
<
[ChangeNotification](#changenotification)
>
|No |Callback used to return
a data change event
.|
**Example**
**Example**
...
@@ -2469,7 +2469,7 @@ class KvstoreModel {
...
@@ -2469,7 +2469,7 @@ class KvstoreModel {
off(event: 'syncComplete', syncCallback?: Callback
<
Array
<
[string, number]
>>
): void
off(event: 'syncComplete', syncCallback?: Callback
<
Array
<
[string, number]
>>
): void
Unsubscribes from
data chang
e events. This API returns the result synchronously.
Unsubscribes from
synchronization complet
e events. This API returns the result synchronously.
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
...
@@ -2477,8 +2477,8 @@ Unsubscribes from data change events. This API returns the result synchronously.
...
@@ -2477,8 +2477,8 @@ Unsubscribes from data change events. This API returns the result synchronously.
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event |string | Yes |Event to unsubscribe from. The value is
**syncComplete**
, which indicates
completion of a data synchronization
. |
| event |string | Yes |Event to unsubscribe from. The value is
**syncComplete**
, which indicates
a synchronization complete event
. |
| syncCallback |Callback
<
Array
<
[string, number]
>>
| No |Callback used to return
the synchronization resul
t. |
| syncCallback |Callback
<
Array
<
[string, number]
>>
| No |Callback used to return
a synchronization complete even
t. |
**Example**
**Example**
...
@@ -4062,7 +4062,7 @@ try {
...
@@ -4062,7 +4062,7 @@ try {
on(event: 'syncComplete', syncCallback: Callback
<
Array
<
[string, number]
>>
): void
on(event: 'syncComplete', syncCallback: Callback
<
Array
<
[string, number]
>>
): void
Subscribes to
data
synchronization complete events.
Subscribes to synchronization complete events.
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
...
@@ -4070,8 +4070,8 @@ Subscribes to data synchronization complete events.
...
@@ -4070,8 +4070,8 @@ Subscribes to data synchronization complete events.
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event |string | Yes |Event to subscribe to. The value is
**syncComplete**
, which indicates
completion of a data synchronization
. |
| event |string | Yes |Event to subscribe to. The value is
**syncComplete**
, which indicates
a synchronization complete event
. |
| syncCallback |Callback
<
Array
<
[string, number]
>>
| Yes |Callback
used to return the synchronization resul
t. |
| syncCallback |Callback
<
Array
<
[string, number]
>>
| Yes |Callback
invoked to return a synchronization complete even
t. |
**Example**
**Example**
...
@@ -4106,8 +4106,8 @@ Unsubscribes from data synchronization complete events.
...
@@ -4106,8 +4106,8 @@ Unsubscribes from data synchronization complete events.
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event |string | Yes |Event to unsubscribe from. The value is
**syncComplete**
, which indicates
completion of a data synchronization
. |
| event |string | Yes |Event to unsubscribe from. The value is
**syncComplete**
, which indicates
a synchronization complete event
. |
| syncCallback |Callback
<
Array
<
[string, number]
>>
| No |Callback used to return
the synchronization resul
t. |
| syncCallback |Callback
<
Array
<
[string, number]
>>
| No |Callback used to return
a data synchronization complete even
t. |
**Example**
**Example**
...
@@ -4142,9 +4142,9 @@ Subscribes to data changes of the specified type. This API returns the result sy
...
@@ -4142,9 +4142,9 @@ Subscribes to data changes of the specified type. This API returns the result sy
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event |string | Yes |Event to subscribe to. The value is
**dataChange**
, which indicates
data changes
. |
| event |string | Yes |Event to subscribe to. The value is
**dataChange**
, which indicates
a data change event
. |
| type |
[
SubscribeType
](
#subscribetype
)
| Yes |Subscription type. |
| type |
[
SubscribeType
](
#subscribetype
)
| Yes |Subscription type. |
| listener |Callback
<
[ChangeNotification](#changenotification)
>
| Yes |Callback used to return
the resul
t.|
| listener |Callback
<
[ChangeNotification](#changenotification)
>
| Yes |Callback used to return
a data change even
t.|
**Example**
**Example**
...
@@ -4160,7 +4160,7 @@ kvStore.on('dataChange', distributedData.SubscribeType.SUBSCRIBE_TYPE_LOCAL, fun
...
@@ -4160,7 +4160,7 @@ kvStore.on('dataChange', distributedData.SubscribeType.SUBSCRIBE_TYPE_LOCAL, fun
off(event:'dataChange', listener?: Callback
<
ChangeNotification
>
): void
off(event:'dataChange', listener?: Callback
<
ChangeNotification
>
): void
Unsubscribes from data change
event
s. This API returns the result synchronously.
Unsubscribes from data changes. This API returns the result synchronously.
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
...
@@ -4168,8 +4168,8 @@ Unsubscribes from data change events. This API returns the result synchronously.
...
@@ -4168,8 +4168,8 @@ Unsubscribes from data change events. This API returns the result synchronously.
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event |string | Yes |Event to unsubscribe from. The value is
**dataChange**
, which indicates
data changes
. |
| event |string | Yes |Event to unsubscribe from. The value is
**dataChange**
, which indicates
a data change event
. |
| listener |Callback
<
[ChangeNotification](#changenotification)
>
|No |Callback used to return
the resul
t.|
| listener |Callback
<
[ChangeNotification](#changenotification)
>
|No |Callback used to return
a data change even
t.|
**Example**
**Example**
...
@@ -5572,7 +5572,7 @@ try {
...
@@ -5572,7 +5572,7 @@ try {
on(event: 'syncComplete', syncCallback: Callback
<
Array
<
[string, number]
>>
): void
on(event: 'syncComplete', syncCallback: Callback
<
Array
<
[string, number]
>>
): void
Subscribes to
data
synchronization complete events.
Subscribes to synchronization complete events.
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
...
@@ -5580,8 +5580,8 @@ Subscribes to data synchronization complete events.
...
@@ -5580,8 +5580,8 @@ Subscribes to data synchronization complete events.
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event |string | Yes |Event to subscribe to. The value is
**syncComplete**
, which indicates
the dat
a synchronization complete event.|
| event |string | Yes |Event to subscribe to. The value is
**syncComplete**
, which indicates a synchronization complete event.|
| syncCallback |Callback
<Array
&
lt
;[
string
,
number
]&
gt
;
>
| Yes |Callback
used to return the synchronization resul
t. |
| syncCallback |Callback
<Array
&
lt
;[
string
,
number
]&
gt
;
>
| Yes |Callback
invoked to return a synchronization complete even
t. |
**Example**
**Example**
...
@@ -5616,8 +5616,8 @@ Unsubscribes from synchronization complete events. This API returns the result s
...
@@ -5616,8 +5616,8 @@ Unsubscribes from synchronization complete events. This API returns the result s
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event |string | Yes |Event to unsubscribe from. The value is
**syncComplete**
, which indicates the
dat
a synchronization complete event.|
| event |string | Yes |Event to unsubscribe from. The value is
**syncComplete**
, which indicates the a synchronization complete event.|
| syncCallback |Callback<Array
<
[string, number]
>>
| No |Callback used to return
the synchronization resul
t. |
| syncCallback |Callback<Array
<
[string, number]
>>
| No |Callback used to return
a synchronization complete even
t. |
**Example**
**Example**
...
@@ -5652,9 +5652,9 @@ Subscribes to data changes of the specified type. This API returns the result sy
...
@@ -5652,9 +5652,9 @@ Subscribes to data changes of the specified type. This API returns the result sy
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event |string | Yes |Event to subscribe to. The value is
**dataChange**
, which indicates
data changes
. |
| event |string | Yes |Event to subscribe to. The value is
**dataChange**
, which indicates
a data change event
. |
| type |
[
SubscribeType
](
#subscribetype
)
| Yes |
Subscription typ
e. |
| type |
[
SubscribeType
](
#subscribetype
)
| Yes |
Type of data chang
e. |
| listener |Callback
<
[ChangeNotification](#changenotification)
>
| Yes |Callback used to return
data changes
.|
| listener |Callback
<
[ChangeNotification](#changenotification)
>
| Yes |Callback used to return
a data change event
.|
**Example**
**Example**
...
@@ -5670,7 +5670,7 @@ kvStore.on('dataChange', distributedData.SubscribeType.SUBSCRIBE_TYPE_LOCAL, fun
...
@@ -5670,7 +5670,7 @@ kvStore.on('dataChange', distributedData.SubscribeType.SUBSCRIBE_TYPE_LOCAL, fun
off(event:'dataChange', listener?: Callback
<
ChangeNotification
>
): void
off(event:'dataChange', listener?: Callback
<
ChangeNotification
>
): void
Unsubscribes from data change
event
s. This API returns the result synchronously.
Unsubscribes from data changes. This API returns the result synchronously.
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
**System capability**
: SystemCapability.DistributedDataManager.KVStore.Core
...
@@ -5678,8 +5678,8 @@ Unsubscribes from data change events. This API returns the result synchronously.
...
@@ -5678,8 +5678,8 @@ Unsubscribes from data change events. This API returns the result synchronously.
| Name | Type| Mandatory | Description |
| Name | Type| Mandatory | Description |
| ----- | ------ | ---- | ----------------------- |
| ----- | ------ | ---- | ----------------------- |
| event |string | Yes |Event to unsubscribe from. The value is
**dataChange**
, which indicates
data changes
. |
| event |string | Yes |Event to unsubscribe from. The value is
**dataChange**
, which indicates
a data change event
. |
| listener |Callback
<
[ChangeNotification](#changenotification)
>
|No |Callback used to return
data changes
.|
| listener |Callback
<
[ChangeNotification](#changenotification)
>
|No |Callback used to return
a data change event
.|
**Example**
**Example**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录