From 1e86b4be297f19cfda883dbbed2653dfe7cf903b Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Wed, 7 Sep 2022 14:57:35 +0800 Subject: [PATCH] update docs Signed-off-by: Annie_wang --- .../reference/apis/js-apis-document.md | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-document.md b/en/application-dev/reference/apis/js-apis-document.md index 3fbdc4f46c..1ff80d1b41 100644 --- a/en/application-dev/reference/apis/js-apis-document.md +++ b/en/application-dev/reference/apis/js-apis-document.md @@ -2,7 +2,7 @@ > **NOTE**
> - The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. -> - The APIs of this module will be deprecated and are not recommended for use. An exception will be thrown if any of the APIs is called. +> - The APIs of this module have been deprecated since API version 9 and are not recommended for use. An exception will be thrown if any of the APIs is called. ## Modules to Import @@ -10,7 +10,7 @@ import document from '@ohos.document'; ``` -## document.choose +## document.choose(deprecated) choose(types? : string[]): Promise<string> @@ -20,15 +20,15 @@ Chooses files of the specified types using the file manager. This API uses a pro **Parameters** -| Name| Type | Mandatory| Description | -| ------ | ------ | ---- | ---------------------------- | -| types | string[] | No | Types of the files to choose. | + | Name| Type | Mandatory| Description | + | ------ | ------ | ---- | ---------------------------- | + | types | string[] | No | Types of the files to choose.| **Return value** -| Type | Description | -| --------------------- | -------------- | -| Promise<string> | Promise used to return the result. An error code is returned.| + | Type | Description | + | --------------------- | -------------- | + | Promise<string> | Promise used to return the result. An error code is returned.| **Example** @@ -36,7 +36,7 @@ Chooses files of the specified types using the file manager. This API uses a pro let types = []; document.choose(types); ``` -## document.choose +## document.choose(deprecated) choose(callback:AsyncCallback<string>): void @@ -46,9 +46,9 @@ Chooses a file using the file manager. This API uses an asynchronous callback to **Parameters** -| Name | Type | Mandatory| Description | -| -------- | --------------------------- | ---- | ---------------------------- | -| callback | AsyncCallback<string> | Yes | Callback used to return the result. An error code is returned.| + | Name | Type | Mandatory| Description | + | -------- | --------------------------- | ---- | ---------------------------- | + | callback | AsyncCallback<string> | Yes | Callback used to return the result. An error code is returned.| **Example** @@ -58,7 +58,7 @@ Chooses a file using the file manager. This API uses an asynchronous callback to // Do something with the URI. }); ``` -## document.choose +## document.choose(deprecated) choose(types:string[], callback:AsyncCallback<string>): void @@ -68,10 +68,10 @@ Chooses files using the file manager. This API uses an asynchronous callback to **Parameters** -| Name | Type | Mandatory| Description | -| -------- | --------------------------- | ---- | ---------------------------- | -| types | string[] | No | Types of the files to choose.| -| callback | AsyncCallback<string> | Yes | Callback used to return the result. An error code is returned.| + | Name | Type | Mandatory| Description | + | -------- | --------------------------- | ---- | ---------------------------- | + | types | string[] | No | Types of the files to choose.| + | callback | AsyncCallback<string> | Yes | Callback used to return the result. An error code is returned.| **Example** @@ -83,7 +83,7 @@ Chooses files using the file manager. This API uses an asynchronous callback to }); ``` -## document.show +## document.show(deprecated) show(uri:string, type:string):Promise<void> @@ -93,16 +93,16 @@ Opens a file. This API uses a promise to return the result. **Parameters** -| Name| Type | Mandatory| Description | -| ---- | ------ | ---- | ---------------------------- | -| uri | string | Yes | URI of the file to open.| -| type | string | Yes | Type of the file to open.| + | Name| Type | Mandatory| Description | + | ---- | ------ | ---- | ---------------------------- | + | uri | string | Yes | URI of the file to open.| + | type | string | Yes | Type of the file to open.| **Return value** -| Type | Description | -| --------------------- | ------------ | -| Promise<void> | Promise used to return the result. An error code is returned.| + | Type | Description | + | --------------------- | ------------ | + | Promise<void> | Promise used to return the result. An error code is returned.| **Example** @@ -112,7 +112,7 @@ Opens a file. This API uses a promise to return the result. document.show(uri, type); ``` -## document.show +## document.show(deprecated) show(uri:string, type:string, callback:AsyncCallback<void>): void @@ -122,11 +122,11 @@ Opens a file. This API uses an asynchronous callback to return the result. **Parameters** -| Name | Type | Mandatory| Description | -| -------- | --------------------------- | ---- | ---------------------------- | -| uri | string | Yes | URI of the file to open.| -| type | string | Yes | Type of the file to open.| -| callback | AsyncCallback<void> | Yes | Callback used to return the result. An error code is returned. | + | Name | Type | Mandatory| Description | + | -------- | --------------------------- | ---- | ---------------------------- | + | uri | string | Yes | URI of the file to open.| + | type | string | Yes | Type of the file to open.| + | callback | AsyncCallback<void> | Yes | Callback used to return the result. An error code is returned. | **Example** -- GitLab