提交 ead6eaad 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 caa12d24
...@@ -722,7 +722,7 @@ Subscribes to service status changes. ...@@ -722,7 +722,7 @@ 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 a service status change event.| | event | string | Yes | Event to subscribe to. The value is **distributedDataServiceDie**, which indicates a service status change event.|
| deathCallback | Callback&lt;void&gt; | Yes | Callback invoked to service status changes. | | deathCallback | Callback&lt;void&gt; | Yes | Callback invoked to return service status changes. |
**Example** **Example**
...@@ -2847,7 +2847,7 @@ try { ...@@ -2847,7 +2847,7 @@ try {
### get ### get
get(key: string, callback: AsyncCallback<boolean | string| number | Uint8Array>): void get(key: string, callback: AsyncCallback&lt;boolean | string | number | Uint8Array&gt;): void
Obtains the value of the specified key. This API uses an asynchronous callback to return the result. Obtains the value of the specified key. This API uses an asynchronous callback to return the result.
...@@ -2898,7 +2898,7 @@ try { ...@@ -2898,7 +2898,7 @@ try {
### get ### get
get(key: string): Promise&lt;boolean | string| number | Uint8Array&gt; get(key: string): Promise&lt;boolean | string | number | Uint8Array&gt;
Obtains the value of the specified key. This API uses a promise to return the result. Obtains the value of the specified key. This API uses a promise to return the result.
...@@ -4849,7 +4849,7 @@ Before calling any method in **DeviceKVStore**, you must use [getKVStore](#getkv ...@@ -4849,7 +4849,7 @@ Before calling any method in **DeviceKVStore**, you must use [getKVStore](#getkv
### get ### get
get(key: string, callback: AsyncCallback<boolean | string| number | Uint8Array>): void get(key: string, callback: AsyncCallback&lt;boolean | string | number | Uint8Array&gt;): void
Obtains the value of the specified key for this device. This API uses an asynchronous callback to return the result. Obtains the value of the specified key for this device. This API uses an asynchronous callback to return the result.
...@@ -4900,7 +4900,7 @@ try { ...@@ -4900,7 +4900,7 @@ try {
### get ### get
get(key: string): Promise&lt;boolean | string| number | Uint8Array&gt; get(key: string): Promise&lt;boolean | string | number | Uint8Array&gt;
Obtains the value of the specified key for this device. This API uses a promise to return the result. Obtains the value of the specified key for this device. This API uses a promise to return the result.
...@@ -4952,7 +4952,7 @@ try { ...@@ -4952,7 +4952,7 @@ try {
### get ### get
get(deviceId: string, key: string, callback: AsyncCallback&lt;boolean|string|number|Uint8Array&gt;): void get(deviceId: string, key: string, callback: AsyncCallback&lt;boolean | string | number | Uint8Array&gt;): void
Obtains a string value that matches the specified device ID and key. This API uses an asynchronous callback to return the result. Obtains a string value that matches the specified device ID and key. This API uses an asynchronous callback to return the result.
...@@ -5004,7 +5004,7 @@ try { ...@@ -5004,7 +5004,7 @@ try {
### get ### get
get(deviceId: string, key: string): Promise&lt;boolean|string|number|Uint8Array&gt; get(deviceId: string, key: string): Promise&lt;boolean | string | number | Uint8Array&gt;
Obtains a string value that matches the specified device ID and key. This API uses a promise to return the result. Obtains a string value that matches the specified device ID and key. This API uses a promise to return the result.
......
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
## storage.set ## storage.set
get(options: SetStorageOptions): void set(options: SetStorageOptions): void
Sets the value in the cache based on the specified key. Sets the value in the cache based on the specified key.
...@@ -167,8 +167,8 @@ export default { ...@@ -167,8 +167,8 @@ export default {
| key | string | Yes | Key of the data to set. | | key | string | Yes | Key of the data to set. |
| value | string | Yes | New value to set. The length must be less than 128 bytes. | | value | string | Yes | New value to set. The length must be less than 128 bytes. |
| success | () => void | No | Called when **storage.set()** is called successfully. | | success | () => void | No | Called when **storage.set()** is called successfully. |
| fail | (data: string, code: number) => void | No | Called to return the result when **storage.get()** fails to be called. **data** is the error information, and **code** indicates the error code. | | fail | (data: string, code: number) => void | No | Called to return the result when **storage.set()** fails to be called. **data** is the error information, and **code** indicates the error code. |
| complete | () => void | No | Called when **storage.get()** is complete. | | complete | () => void | No | Called when **storage.set()** is complete. |
## ClearStorageOptions ## ClearStorageOptions
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册