diff --git a/en/application-dev/reference/apis/js-apis-animator.md b/en/application-dev/reference/apis/js-apis-animator.md
index 4086ca77e506b148c95fdf81e942f44642a5ffca..da7ec7d145779eb5044427fdee758a34f6b33fdc 100644
--- a/en/application-dev/reference/apis/js-apis-animator.md
+++ b/en/application-dev/reference/apis/js-apis-animator.md
@@ -40,10 +40,10 @@ Creates an **Animator** object.
easing: 'friction',
delay: 0,
fill: 'forwards',
- direction: "normal",
+ direction: 'normal',
iterations: 3,
begin: 200.0,
- end: 400.0,
+ end: 400.0
};
animator.create(options);
```
@@ -83,10 +83,10 @@ let options = {
easing: 'friction',
delay: 0,
fill: 'forwards',
- direction: "normal",
+ direction: 'normal',
iterations: 3,
begin: 200.0,
- end: 400.0,
+ end: 400.0
};
try {
animator.reset(options);
@@ -283,7 +283,7 @@ export default {
easing: 'friction',
delay: 0,
fill: 'forwards',
- direction: "normal",
+ direction: 'normal',
iterations: 2,
begin: 200.0,
end: 400.0
@@ -516,7 +516,7 @@ let options = {
easing: 'friction',
delay: 0,
fill: 'forwards',
- direction: "normal",
+ direction: 'normal',
iterations: 3,
begin: 200.0,
end: 400.0,
diff --git a/en/application-dev/reference/apis/js-apis-mediaquery.md b/en/application-dev/reference/apis/js-apis-mediaquery.md
index 4176338c0957632f67df2a74c73cd51a8ab1d48d..f44a0801b9ae1d9d4fec2f4485bf848e8595caa5 100644
--- a/en/application-dev/reference/apis/js-apis-mediaquery.md
+++ b/en/application-dev/reference/apis/js-apis-mediaquery.md
@@ -1,4 +1,4 @@
-# Media Query
+# @ohos.mediaquery
The **mediaquery** module provides different styles for different media types.
@@ -14,64 +14,64 @@ import mediaquery from '@ohos.mediaquery'
```
-## Required Permissions
-
-None.
-
-
## mediaquery.matchMediaSync
matchMediaSync(condition: string): MediaQueryListener
-Sets the media query criteria and returns the corresponding listening handle.
+Sets the media query condition. This API returns the corresponding media query listener.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
**Parameters**
+
| Name | Type | Mandatory | Description |
| --------- | ------ | ---- | ---------------------------------------- |
-| condition | string | Yes | Matching condition of a media event. For details, see [Syntax of Media Query Conditions](../../ui/ui-ts-layout-mediaquery.md#syntax-of-media-query-conditions).|
+| condition | string | Yes | Media query condition. For details, see [Syntax of Media Query Conditions](../../ui/ui-ts-layout-mediaquery.md#syntax-of-media-query-conditions).|
**Return value**
+
| Type | Description |
| ------------------ | ---------------------- |
-| MediaQueryListener | Listening handle to a media event, which is used to register or deregister the listening callback.|
+| MediaQueryListener | Media query listener, which is used to register or deregister the listening callback.|
**Example**
- ```js
+
+```js
let listener = mediaquery.matchMediaSync('(orientation: landscape)'); // Listen for landscape events.
- ```
+```
## MediaQueryListener
-Media query handle, including the first query result when the handle is applied for.
+Implements the media query listener, including the first query result when the listener is applied for.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
### Attributes
-| Name | Type | Readable | Writable | Description |
-| ------- | ------- | ---- | ---- | ---------- |
-| matches | boolean | Yes | No | Whether the match condition is met. |
-| media | string | Yes | No | Matching condition of a media event.|
+| Name | Type | Readable| Writable| Description |
+| ------- | ------- | ---- | ---- | -------------------- |
+| matches | boolean | Yes | No | Whether the media query condition is met. |
+| media | string | Yes | No | Media query condition.|
### on
on(type: 'change', callback: Callback<MediaQueryResult>): void
-Registers a callback with the corresponding query condition by using the handle. This callback is triggered when the media attributes change.
+Registers the media query listener. The callback is triggered when the media attributes change.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
**Parameters**
+
| Name | Type | Mandatory | Description |
| -------- | -------------------------------- | ---- | ---------------- |
-| type | string | Yes | Must enter the string **change**.|
+| type | string | Yes | Listener type. The value is fixed at **'change'**.|
| callback | Callback<MediaQueryResult> | Yes | Callback registered with media query. |
**Example**
+
For details, see [off Example](#off).
@@ -79,17 +79,19 @@ Registers a callback with the corresponding query condition by using the handle.
off(type: 'change', callback?: Callback<MediaQueryResult>): void
-Deregisters a callback with the corresponding query condition by using the handle, so that no callback is triggered when the media attributes change.
+Deregisters the media query listener, so that no callback is triggered when the media attributes change.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | -------------------------------- | ---- | ----------------------------- |
-| type | boolean | Yes | Must enter the string **change**. |
-| callback | Callback<MediaQueryResult> | No | Callback to be deregistered. If the default value is used, all callbacks of the handle are deregistered.|
+
+| Name | Type | Mandatory| Description |
+| -------- | -------------------------------- | ---- | ---------------------------------------------------------- |
+| type | string | Yes | Listener type. The value is fixed at **'change'**. |
+| callback | Callback<MediaQueryResult> | No | Callback to be deregistered. If the default value is used, all callbacks of the handle are deregistered.|
**Example**
+
```js
import mediaquery from '@ohos.mediaquery'
@@ -101,20 +103,23 @@ Deregisters a callback with the corresponding query condition by using the handl
// do something here
}
}
- listener.on('change', onPortrait) // Register a callback.
- listener.off('change', onPortrait) // Deregister a callback.
+ listener.on('change', onPortrait) // Register the media query listener.
+ listener.off('change', onPortrait) // Deregister the media query listener.
```
-
## MediaQueryResult
+Provides the media query result.
+
+**System capability**: SystemCapability.ArkUI.ArkUI.Full
+
### Attributes
-| Name | Type | Readable | Writable | Description |
-| ------- | ------- | ---- | ---- | ---------- |
-| matches | boolean | Yes | No | Whether the match condition is met. |
-| media | string | Yes | No | Matching condition of a media event.|
+| Name | Type | Readable| Writable| Description |
+| ------- | ------- | ---- | ---- | -------------------- |
+| matches | boolean | Yes | No | Whether the media query condition is met. |
+| media | string | Yes | No | Media query condition.|
### Example
diff --git a/en/application-dev/reference/apis/js-apis-prompt.md b/en/application-dev/reference/apis/js-apis-prompt.md
index 1fd0357783d6cf3ead6913cfc07a0e4b4e1c3c82..27a450de58306f1b018468d6f2590778a9f0d484 100644
--- a/en/application-dev/reference/apis/js-apis-prompt.md
+++ b/en/application-dev/reference/apis/js-apis-prompt.md
@@ -1,4 +1,4 @@
-# Prompt
+# @ohos.prompt
The **Prompt** module provides APIs for creating and showing toasts, dialog boxes, and action menus.
@@ -146,11 +146,11 @@ Describes the options for showing the dialog box.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
-| Name | Type | Mandatory | Description |
-| ------- | ---------------------------------------- | ---- | ---------------------------------------- |
-| title | string\| [Resource](../arkui-ts/ts-types.md#resource)9+ | No | Title of the dialog box. |
-| message | string\| [Resource](../arkui-ts/ts-types.md#resource)9+ | No | Text body. |
-| buttons | Array | No | Array of buttons in the dialog box. The array structure is **{text:'button', color: '\#666666'}**. Up to three buttons are supported. The first button is of the **positiveButton** type, the second is of the **negativeButton** type, and the third is of the **neutralButton** type.|
+| Name | Type | Mandatory| Description |
+| ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
+| title | string\| [Resource](../arkui-ts/ts-types.md#resource)9+ | No | Title of the dialog box. |
+| message | string\| [Resource](../arkui-ts/ts-types.md#resource)9+ | No | Text body. |
+| buttons | [[Button](#button),[Button](#button)?,[Button](#button)?] | No | Array of buttons in the dialog box. The array structure is **{text:'button', color: '\#666666'}**. Up to three buttons are supported. The first button is of the **positiveButton** type, the second is of the **negativeButton** type, and the third is of the **neutralButton** type.|
## ShowDialogSuccessResponse
@@ -158,9 +158,9 @@ Describes the dialog box response result.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
-| Name | Type | Description |
-| ----- | ------ | ------------------- |
-| index | number | Index of the selected button in the **buttons** array.|
+| Name | Type | Mandatory| Description |
+| ----- | ------ | ---- | ------------------------------- |
+| index | number | No | Index of the selected button in the **buttons** array.|
## prompt.showActionMenu
@@ -255,10 +255,10 @@ Describes the options for showing the action menu.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
-| Name | Type | Mandatory | Description |
-| ------- | ---------------------------------------- | ---- | ---------------------------------------- |
-| title | string\| [Resource](../arkui-ts/ts-types.md#resource)9+ | No | Title of the text to display. |
-| buttons | Array<[Button](#button)> | Yes | Array of menu item buttons. The array structure is **{text:'button', color: '\#666666'}**. Up to six buttons are supported. If there are more than six buttons, extra buttons will not be displayed.|
+| Name | Type | Mandatory| Description |
+| ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
+| title | string\| [Resource](../arkui-ts/ts-types.md#resource)9+ | No | Title of the text to display. |
+| buttons | [[Button](#button),[Button](#button)?,[Button](#button)?,[Button](#button)?,[Button](#button)?,[Button](#button)?] | Yes | Array of menu item buttons. The array structure is **{text:'button', color: '\#666666'}**. Up to six buttons are supported. If there are more than six buttons, extra buttons will not be displayed.|
## ActionMenuSuccessResponse
diff --git a/en/application-dev/reference/apis/js-apis-promptAction.md b/en/application-dev/reference/apis/js-apis-promptAction.md
index 268673b046bbb5f775dfffe3986105718319d009..0faa9cf211bbd0a673287c34b8d9ad45d34374e6 100644
--- a/en/application-dev/reference/apis/js-apis-promptAction.md
+++ b/en/application-dev/reference/apis/js-apis-promptAction.md
@@ -1,4 +1,4 @@
-# Prompt
+# @ohos.promptAction
The **PromptAction** module provides APIs for creating and showing toasts, dialog boxes, and action menus.
@@ -32,7 +32,7 @@ For details about the error codes, see [promptAction Error Codes](../errorcodes/
| ID | Error Message|
| --------- | ------- |
-| 100001 | Internal error. |
+| 100001 | If UI execution context not found. |
**Example**
@@ -88,7 +88,7 @@ For details about the error codes, see [promptAction Error Codes](../errorcodes/
| ID | Error Message|
| --------- | ------- |
-| 100001 | Internal error. |
+| 100001 | If UI execution context not found. |
**Example**
@@ -142,7 +142,7 @@ For details about the error codes, see [promptAction Error Codes](../errorcodes/
| ID | Error Message|
| --------- | ------- |
-| 100001 | Internal error. |
+| 100001 | If UI execution context not found. |
**Example**
@@ -181,11 +181,11 @@ Describes the options for showing the dialog box.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
-| Name | Type | Mandatory | Description |
-| ------- | ---------------------------------------- | ---- | ---------------------------------------- |
-| title | string\| [Resource](../arkui-ts/ts-types.md#resource)9+| No | Title of the dialog box. |
-| message | string\| [Resource](../arkui-ts/ts-types.md#resource)9+| No | Text body. |
-| buttons | Array | No | Array of buttons in the dialog box. The array structure is **{text:'button', color: '\#666666'}**. Up to three buttons are supported. The first button is of the **positiveButton** type, the second is of the **negativeButton** type, and the third is of the **neutralButton** type.|
+| Name | Type | Mandatory| Description |
+| ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
+| title | string\| [Resource](../arkui-ts/ts-types.md#resource)9+| No | Title of the dialog box. |
+| message | string\| [Resource](../arkui-ts/ts-types.md#resource)9+| No | Text body. |
+| buttons | [[Button](#button),[Button](#button)?,[Button](#button)?] | No | Array of buttons in the dialog box. The array structure is **{text:'button', color: '\#666666'}**. Up to three buttons are supported. The first button is of the **positiveButton** type, the second is of the **negativeButton** type, and the third is of the **neutralButton** type.|
## ShowDialogSuccessResponse
@@ -193,9 +193,9 @@ Describes the dialog box response result.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
-| Name | Type | Description |
-| ----- | ------ | ------------------- |
-| index | number | Index of the selected button in the **buttons** array.|
+| Name | Type | Mandatory| Description |
+| ----- | ------ | ---- | ------------------------------- |
+| index | number | No | Index of the selected button in the **buttons** array.|
## promptAction.showActionMenu
@@ -218,7 +218,7 @@ For details about the error codes, see [promptAction Error Codes](../errorcodes/
| ID | Error Message|
| --------- | ------- |
-| 100001 | Internal error. |
+| 100001 | If UI execution context not found. |
**Example**
@@ -276,7 +276,7 @@ For details about the error codes, see [promptAction Error Codes](../errorcodes/
| ID | Error Message|
| --------- | ------- |
-| 100001 | Internal error. |
+| 100001 | If UI execution context not found. |
**Example**
@@ -314,10 +314,10 @@ Describes the options for showing the action menu.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
-| Name | Type | Mandatory | Description |
-| ------- | ---------------------------------------- | ---- | ---------------------------------------- |
-| title | string\| [Resource](../arkui-ts/ts-types.md#resource)9+| No | Title of the dialog box. |
-| buttons | Array<[Button](#button)> | Yes | Array of menu item buttons. The array structure is **{text:'button', color: '\#666666'}**. Up to six buttons are supported. If there are more than six buttons, extra buttons will not be displayed.|
+| Name | Type | Mandatory| Description |
+| ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
+| title | string\| [Resource](../arkui-ts/ts-types.md#resource)9+| No | Title of the dialog box. |
+| buttons | [[Button](#button),[Button](#button)?,[Button](#button)?,[Button](#button)?,[Button](#button)?,[Button](#button)?] | Yes | Array of menu item buttons. The array structure is **{text:'button', color: '\#666666'}**. Up to six buttons are supported. If there are more than six buttons, extra buttons will not be displayed.|
## ActionMenuSuccessResponse