From 712a5fd05876a97654d8e2728d353bb6c905239a Mon Sep 17 00:00:00 2001 From: luoying_ace_admin Date: Tue, 9 Jul 2024 08:41:57 +0000 Subject: [PATCH] add uicontext dialog api Signed-off-by: luoying_ace_admin Change-Id: I284a9247494bae005a56a0de91b1b0ae523939d3 --- api/@ohos.arkui.UIContext.d.ts | 35 +++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/api/@ohos.arkui.UIContext.d.ts b/api/@ohos.arkui.UIContext.d.ts index b1d51e117..4568c17c1 100644 --- a/api/@ohos.arkui.UIContext.d.ts +++ b/api/@ohos.arkui.UIContext.d.ts @@ -1190,6 +1190,39 @@ export class PromptAction { * @since 12 */ closeCustomDialog(dialogContent: ComponentContent): Promise; + + /** + * Open the custom dialog. + * + * @param { promptAction.CustomDialogOptions } options - Options. + * @returns { Promise } return the dialog id that will be used by closeCustomDialog. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + openCustomDialog(options: promptAction.CustomDialogOptions): Promise; + + /** + * Close the custom dialog. + * + * @param { number } dialogId - the dialog id that returned by openCustomDialog. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + closeCustomDialog(dialogId: number): void; } /** @@ -3187,4 +3220,4 @@ export const enum SwiperDynamicSyncSceneType { * @since 12 */ ANIMATION = 1 -} \ No newline at end of file +}