From c06071967f888b4a5aacbfde831514235de88613 Mon Sep 17 00:00:00 2001 From: "ester.zhou" Date: Fri, 17 Mar 2023 17:36:04 +0800 Subject: [PATCH] Update doc (15895) Signed-off-by: ester.zhou --- .../reference/apis/js-apis-commonEventManager.md | 14 +++++++------- .../arkui-ts/ts-methods-custom-dialog-box.md | 5 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-commonEventManager.md b/en/application-dev/reference/apis/js-apis-commonEventManager.md index 8f150f4bbf..c94524533f 100644 --- a/en/application-dev/reference/apis/js-apis-commonEventManager.md +++ b/en/application-dev/reference/apis/js-apis-commonEventManager.md @@ -86,8 +86,8 @@ For details about the error codes, see [Event Error Codes](../errorcodes/errorco ```ts // Attributes of a common event. let options = { - code: 0, // Initial code of the common event. - data: "initial data",// Initial data of the common event. + code: 0, // Result code of the common event. + data: "initial data",// Result data of the common event. isOrdered: true // The common event is an ordered one. } @@ -186,8 +186,8 @@ For details about the error codes, see [Event Error Codes](../errorcodes/errorco ```ts // Attributes of a common event. let options = { - code: 0, // Initial code of the common event. - data: "initial data",// Initial data of the common event. + code: 0, // Result code of the common event. + data: "initial data",// Result data of the common event. } // Callback for common event publication. @@ -224,7 +224,7 @@ Creates a subscriber. This API uses an asynchronous callback to return the resul | Name | Type | Mandatory| Description | | ------------- | ------------------------------------------------------------ | ---- | -------------------------- | -| subscribeInfo | [CommonEventSubscribeInfo](./js-apis-inner-commonEvent-commonEventSubscribeInfo.md) | Yes | Subscriber information. | +| subscribeInfo | [CommonEventSubscribeInfo](./js-apis-inner-commonEvent-commonEventSubscribeInfo.md) | Yes | Subscriber information. | | callback | AsyncCallback\<[CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md)> | Yes | Callback used to return the result.| **Example** @@ -270,7 +270,7 @@ Creates a subscriber. This API uses a promise to return the result. | Name | Type | Mandatory| Description | | ------------- | ----------------------------------------------------- | ---- | -------------- | -| subscribeInfo | [CommonEventSubscribeInfo](./js-apis-inner-commonEvent-commonEventSubscribeInfo.md) | Yes | Subscriber information.| +| subscribeInfo | [CommonEventSubscribeInfo](./js-apis-inner-commonEvent-commonEventSubscribeInfo.md) | Yes | Subscriber information.| **Return value** | Type | Description | @@ -327,7 +327,7 @@ let subscribeInfo = { // Callback for common event subscription. function SubscribeCB(err, data) { - if (err.code) { + if (err) { console.error(`subscribe failed, code is ${err.code}, message is ${err.message}`); } else { console.info("subscribe "); diff --git a/en/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md b/en/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md index 2aef524442..56ebc03a81 100644 --- a/en/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md +++ b/en/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md @@ -11,7 +11,7 @@ A custom dialog box is a dialog box you customize by using APIs of the **CustomD ## APIs -CustomDialogController(value:{builder: CustomDialog, cancel?: () => void, autoCancel?: boolean, alignment?: DialogAlignment, offset?: Offset, customStyle?: boolean, gridCount?: number, maskColor?: ResourceColor, openAnimation?: AnimateParam, closeAniamtion?: AnimateParam}) +CustomDialogController(value:{builder: CustomDialog, cancel?: () => void, autoCancel?: boolean, alignment?: DialogAlignment, offset?: Offset, customStyle?: boolean, gridCount?: number, maskColor?: ResourceColor, openAnimation?: AnimateParam, closeAniamtion?: AnimateParam, showInSubWindow?: boolean}) **Parameters** @@ -26,8 +26,9 @@ CustomDialogController(value:{builder: CustomDialog, cancel?: () => void, aut | customStyle | boolean | No | Whether to use a custom style for the dialog box.
Default value: **false**, which means that the dialog box automatically adapts its width to the grid system and its height to the child components; the maximum height is 90% of the container height; the rounded corner is 24 vp. | | gridCount8+ | number | No | Number of [grid columns](../../ui/ui-ts-layout-grid-container-new.md) occupied by the dialog box.
The default value is 4, and the maximum value is the maximum number of columns supported by the system. If this parameter is set to an invalid value, the default value is used.| | maskColor10+ | [ResourceColor](ts-types.md#resourcecolor) | No | Custom mask color.
Default value: **0x33000000** | -| openAnimation10+ | [AnimateParam](ts-explicit-animation.md#animateparam) | No | Parameters for defining the open animation of the dialog box. | +| openAnimation10+ | [AnimateParam](ts-explicit-animation.md#animateparam) | No | Parameters for defining the open animation of the dialog box.
**NOTE**
If **iterations** is set to an odd number and **playMode** is set to **Reverse**, the dialog box will not be displayed when the animation ends. | | closeAniamtion10+| [AnimateParam](ts-explicit-animation.md#animateparam) | No | Parameters for defining the close animation of the dialog box. | +| showInSubWindow10+| boolean | No | Whether to display a dialog box in a subwindow.
Default value: **false**, indicating that the dialog box is not displayed in the subwindow
**NOTE**
A dialog box whose **showInSubWindow** attribute is **true** cannot trigger the display of another dialog box whose **showInSubWindow** attribute is also **true**. | ## CustomDialogController -- GitLab