未验证 提交 88035c48 编写于 作者: O openharmony_ci 提交者: Gitee

!20960 [翻译完成】#I7JF1G

Merge pull request !20960 from Annie_wang/PR20273
...@@ -20,7 +20,7 @@ get(options: GetStorageOptions): void ...@@ -20,7 +20,7 @@ get(options: GetStorageOptions): void
Reads the value stored in the cache based on the specified key. Reads the value stored in the cache based on the specified key.
**System capability**: SystemCapability.DistributedDataManager.Preferences.Core **System capability**: SystemCapability.DistributedDataManager.Preferences.Core.Lite
**Parameters** **Parameters**
...@@ -55,7 +55,7 @@ set(options: SetStorageOptions): void ...@@ -55,7 +55,7 @@ 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.
**System capability**: SystemCapability.DistributedDataManager.Preferences.Core **System capability**: SystemCapability.DistributedDataManager.Preferences.Core.Lite
**Parameters** **Parameters**
...@@ -88,7 +88,7 @@ clear(options?: ClearStorageOptions): void ...@@ -88,7 +88,7 @@ clear(options?: ClearStorageOptions): void
Clears the key-value pairs from the cache. Clears the key-value pairs from the cache.
**System capability**: SystemCapability.DistributedDataManager.Preferences.Core **System capability**: SystemCapability.DistributedDataManager.Preferences.Core.Lite
**Parameters** **Parameters**
...@@ -119,7 +119,7 @@ delete(options: DeleteStorageOptions): void ...@@ -119,7 +119,7 @@ delete(options: DeleteStorageOptions): void
Deletes the key-value pair based on the specified key. Deletes the key-value pair based on the specified key.
**System capability**: SystemCapability.DistributedDataManager.Preferences.Core **System capability**: SystemCapability.DistributedDataManager.Preferences.Core.Lite
**Parameters** **Parameters**
...@@ -147,20 +147,20 @@ export default { ...@@ -147,20 +147,20 @@ export default {
## GetStorageOptions ## GetStorageOptions
**System capability**: SystemCapability.DistributedDataManager.Preferences.Core **System capability**: SystemCapability.DistributedDataManager.Preferences.Core.Lite
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------- | ---- | ------------------- | | -------- | ---------------- | ---- | ------------------- |
| key | string | Yes | Key of the target data. | | key | string | Yes | Key of the target data. |
| default | string | No | Default value returned when the specified key does not exist. | | default | string | No | Default value returned when the specified key does not exist. |
| success | (data: any) => void | No | Called to return the result when **storage.get()** is called successfully. **data** is the value indexed by the specified key. | | success | (data: any) => void | No | Called to return the result when **storage.get()** is called successfully. **data** is the value indexed by the specified key. |
| 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.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. | | complete | () => void | No | Called when **storage.get()** is complete. |
## SetStorageOptions ## SetStorageOptions
**System capability**: SystemCapability.DistributedDataManager.Preferences.Core **System capability**: SystemCapability.DistributedDataManager.Preferences.Core.Lite
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------- | ---- | -------------------- | | -------- | ------------------- | ---- | -------------------- |
...@@ -173,23 +173,22 @@ export default { ...@@ -173,23 +173,22 @@ export default {
## ClearStorageOptions ## ClearStorageOptions
**System capability**: SystemCapability.DistributedDataManager.Preferences.Core **System capability**: SystemCapability.DistributedDataManager.Preferences.Core.Lite
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------- | ---- | -------------------- | | -------- | --------------------- | ---- | -------------------- |
| success | () => void | No | Called when **storage.clear()** is called successfully. | | success | () => void | No | Called when **storage.clear()** is called successfully. |
| fail | (data: string, code: number) => void | No | Called to return the result when **storage.clear()** 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.clear()** fails to be called. **data** is the error information, and **code** indicates the error code. |
| complete | () => void | No | Called when **storage.clear()** is complete. | | complete | () => void | No | Called when **storage.clear()** is complete. |
## DeleteStorageOptions ## DeleteStorageOptions
**System capability**: SystemCapability.DistributedDataManager.Preferences.Core **System capability**: SystemCapability.DistributedDataManager.Preferences.Core.Lite
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------ | | -------- | -------------------- | ---- | ------------------ |
| key | string | Yes | Key of the data to delete. | | key | string | Yes | Key of the data to delete. |
| success | () => void | No | Called when **storage.delete()** is called successfully. | | success | () => void | No | Called when **storage.delete()** is called successfully. |
| fail | (data: string, code: number) => void | No | Called to return the result when **storage.delete()** 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.delete()** fails to be called. **data** is the error information, and **code** indicates the error code. |
| complete | () => void | No | Called when **storage.delete()** is complete. | | complete | () => void | No | Called when **storage.delete()** is complete. |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册