diff --git a/en/application-dev/reference/apis/js-apis-prompt.md b/en/application-dev/reference/apis/js-apis-prompt.md index 24d70e98a4d97f58acbf6f4089b36d2b628d304b..e7b196f4a330be1c694a46c04669a307f83769da 100644 --- a/en/application-dev/reference/apis/js-apis-prompt.md +++ b/en/application-dev/reference/apis/js-apis-prompt.md @@ -45,11 +45,11 @@ Describes the options for showing the toast. **System capability**: SystemCapability.ArkUI.ArkUI.Full -| Name | Type | Mandatory | Description | -| -------- | ---------------------------------------- | ---- | ---------------------------------------- | -| message | string \| [Resource](../arkui-ts/ts-types.md#resource)9+ | Yes | Text to display. | -| duration | number | No | Duration that the toast will remain on the screen. The default value is 1500 ms. The value range is 1500 ms to 10000 ms. If a value less than 1500 ms is set, the default value is used. If the value greater than 10000 ms is set, the upper limit 10000 ms is used.| -| bottom | string\| number | No | Distance between the toast border and the bottom of the screen. It does not have an upper limit. The default unit is vp. | +| Name | Type | Mandatory| Description | +| -------- | --------------- | ---- | ------------------------------------------------------------ | +| message | string | Yes | Text to display. | +| duration | number | No | Duration that the toast will remain on the screen. The default value is 1500 ms. The value range is 1500 ms to 10000 ms. If a value less than 1500 ms is set, the default value is used. If the value greater than 10000 ms is set, the upper limit 10000 ms is used.| +| bottom | string\| number | No | Distance between the toast border and the bottom of the screen. It does not have an upper limit. The default unit is vp. | ## prompt.showDialog @@ -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 | [[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.| +| Name | Type | Mandatory| Description | +| ------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ | +| title | string | No | Title of the dialog box. | +| message | string | 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 @@ -257,7 +257,7 @@ Describes the options for showing the action menu. | Name | Type | Mandatory| Description | | ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | -| title | string \| [Resource](../arkui-ts/ts-types.md#resource)9+ | No | Title of the text to display. | +| title | string | 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 @@ -276,7 +276,7 @@ Describes the menu item button in the action menu. **System capability**: SystemCapability.ArkUI.ArkUI.Full -| Name | Type | Mandatory | Description | -| ----- | ---------------------------------------- | ---- | ------- | -| text | string \| [Resource](../arkui-ts/ts-types.md#resource)9+ | Yes | Button text.| -| color | string \| [Resource](../arkui-ts/ts-types.md#resource)9+ | Yes | Text color of the button.| +| Name | Type | Mandatory| Description | +| ----- | ------ | ---- | -------------- | +| text | string | Yes | Button text.| +| color | string | Yes | Text color of the button.| diff --git a/en/application-dev/reference/apis/js-apis-router.md b/en/application-dev/reference/apis/js-apis-router.md index b5cbbd52e0c0bc4cc2f9cd364b679bc02f989f85..9f7933724c12285f56ac130c9c49c51f7e3549e4 100644 --- a/en/application-dev/reference/apis/js-apis-router.md +++ b/en/application-dev/reference/apis/js-apis-router.md @@ -362,7 +362,7 @@ For details about the error codes, see [Router Error Codes](../errorcodes/errorc | ID | Error Message| | --------- | ------- | -| 100001 | if UI execution context not found, only throw in standard system. | +| 100001 | if can not get the delegate, only throw in standard system. | | 200002 | if the uri is not exist. | **Example** @@ -598,7 +598,7 @@ export default { // detail page export default { onInit() { - console.info('showData1:' + router.getParams()[data1]); + console.info('showData1:' + router.getParams()['data1']); } } ``` diff --git a/en/application-dev/reference/arkui-js/js-components-custom-basic-usage.md b/en/application-dev/reference/arkui-js/js-components-custom-basic-usage.md index b6f659f069b4e7c5f6dc6347664552a8c6a82e4d..4759de401d3e60ec49a8434ab27abc0c92e65d34 100644 --- a/en/application-dev/reference/arkui-js/js-components-custom-basic-usage.md +++ b/en/application-dev/reference/arkui-js/js-components-custom-basic-usage.md @@ -3,7 +3,7 @@ Custom components are existing components encapsulated based on service requirements. A custom component can be invoked multiple times in a project to improve the code readability. You can import a custom component to the host page through **element** as shown in the following code snippet: ```html - +
@@ -12,8 +12,8 @@ Custom components are existing components encapsulated based on service requirem The following is an example of using a custom component with **if-else**, which displays **comp1** when **showComp1** is set to **true** and displays **comp2** otherwise. ```html - - + +
@@ -76,7 +76,7 @@ The following example describes how to import **comp** to the parent component: ```html - +
@@ -125,7 +125,7 @@ In the following example, the child component passes the **text** parameter to t ```html - +
Parent component: {{text}} diff --git a/en/application-dev/reference/arkui-js/js-components-custom-props.md b/en/application-dev/reference/arkui-js/js-components-custom-props.md index c9c496b57842c628eabb96377c8096c6a9cc1f9c..c2c0c64961108bcb9f0e2d965b86883593a20dce 100644 --- a/en/application-dev/reference/arkui-js/js-components-custom-props.md +++ b/en/application-dev/reference/arkui-js/js-components-custom-props.md @@ -21,7 +21,7 @@ export default { ```html - +
@@ -57,7 +57,7 @@ In this example, a **\** component is added to display the title. The titl ```html - +
diff --git a/en/application-dev/reference/arkui-js/js-components-custom-slot.md b/en/application-dev/reference/arkui-js/js-components-custom-slot.md index 50c5b9ed0d1ad181567945134be95e0f9c229fed..706268221ec46fd3d18b3c0609229e4c1952efb3 100644 --- a/en/application-dev/reference/arkui-js/js-components-custom-slot.md +++ b/en/application-dev/reference/arkui-js/js-components-custom-slot.md @@ -20,7 +20,7 @@ You can use the **\** tag to create a slot inside a custom component to fi The following references the custom component: ```html - +
Content defined in the parent component @@ -45,7 +45,7 @@ When multiple slots are need inside a custom component, you can name them, so th The following references the custom component: ```html - +
Fill in the second slot. diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-formcomponent.md b/en/application-dev/reference/arkui-ts/ts-basic-components-formcomponent.md index e641340a69dad32e2db89c55ba2d44911d3258b7..3d55b17b5f9f7b2d8c9b742a1261d2902f4de04c 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-formcomponent.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-formcomponent.md @@ -42,7 +42,7 @@ Creates a **FormComponent** instance to display the provided widget. | Name | Type | Mandatory| Description | | --------- | ------------------------------- | ---- | ----------------------------------------------------------------------- | -| id | number | Yes | Widget ID. Set this parameter to **0** for a new widget. | +| id | number | Yes | Widget ID. Set this parameter to **0** for a new widget. | | name | string | Yes | Widget name. | | bundle | string | Yes | Bundle name of the widget. | | ability | string | Yes | Ability name of the widget. | @@ -63,7 +63,7 @@ Creates a **FormComponent** instance to display the provided widget. ## Attributes | Name | Type | Mandatory| Description | | ----------- | ----------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------------- | -| size | {
width?: [Length](ts-types.md#length),
height?: [Length](ts-types.md#length)
} | Yes | Size of the widget. | +| size | {
width?: [Length](ts-types.md#length),
height?: [Length](ts-types.md#length)
} | Yes | Size of the widget. | | moduleName | string | Yes | Module name of the widget. | | dimension | [FormDimension](#formdimension) | No | Dimensions of the widget. The widgets in the 2 x 2, 4 x 4, and 4 x 2 dimensions are supported.
Default value: **Dimension_2_2**| | allowUpdate | boolean | No | Whether to allow the widget to update.
Default value: **true** | @@ -75,10 +75,10 @@ Creates a **FormComponent** instance to display the provided widget. | Name | Description | | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| onAcquired(callback: (info: { id: number }) => void) | Triggered when a widget is obtained. This API returns the ID of the obtained widget. | -| onError(callback: (info: { errcode: number, msg: string }) => void) | Triggered when an error occurs during component loading.
**errcode**: error code.
**msg**: error information. | -| onRouter(callback: (info: any) => void) | Triggered when routing occurs for the widget. This API returns information in [routerEvent](../js-service-widget-ui/js-service-widget-syntax-hml.md#event-binding).| -| onUninstall(callback: (info: { id: number }) => void) | Triggered when a widget is uninstalled. This API returns the ID of the uninstalled widget. | +| onAcquired(callback: (info: { id: number }) => void) | Triggered when a widget is obtained. This API returns the ID of the obtained widget. | +| onError(callback: (info: { errcode: number, msg: string }) => void) | Triggered when an error occurs during component loading.
**errcode**: error code.
**msg**: error information. | +| onRouter(callback: (info: any) => void) | Triggered when routing occurs for the widget. This API returns information in [routerEvent](../js-service-widget-ui/js-service-widget-syntax-hml.md#event-binding).| +| onUninstall(callback: (info: { id: number }) => void) | Triggered when a widget is uninstalled. This API returns the ID of the uninstalled widget. | ## Example @@ -108,7 +108,7 @@ struct CardExample { .visibility(Visibility.Visible) .onAcquired((form)=>{ console.log(`form info : ${JSON.stringify(form)}`); - this.fomId = form.id; + this.formId = form.id; }) .onError((err)=>{ console.log(`fail to add form, err: ${JSON.stringify(err)}`);