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

!14957 [翻译完成】#I6CBYT

Merge pull request !14957 from Annie_wang/PR14194
......@@ -722,7 +722,7 @@ Subscribes to service status changes.
| Name | Type | Mandatory| Description |
| ------------- | -------------------- | ---- | ------------------------------------------------------------ |
| 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 service status changes. |
| deathCallback | Callback<void> | Yes | Callback invoked to return service status changes. |
**Example**
......@@ -2847,7 +2847,7 @@ try {
### 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.
......@@ -2898,7 +2898,7 @@ try {
### 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.
......@@ -4849,7 +4849,7 @@ Before calling any method in **DeviceKVStore**, you must use [getKVStore](#getkv
### 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.
......@@ -4900,7 +4900,7 @@ try {
### 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.
......@@ -4952,7 +4952,7 @@ try {
### 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.
......@@ -5004,7 +5004,7 @@ try {
### 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.
......
......@@ -51,7 +51,7 @@ export default {
## storage.set
get(options: SetStorageOptions): void
set(options: SetStorageOptions): void
Sets the value in the cache based on the specified key.
......@@ -167,8 +167,8 @@ export default {
| key | string | Yes | Key of the data to set. |
| 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. |
| 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. |
| complete | () => void | No | Called when **storage.get()** is complete. |
| 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.set()** is complete. |
## ClearStorageOptions
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册