Add dialog api

Signed-off-by: yangziyong <nsyangziyong@huawei.com>
This commit is contained in:
yangziyong 2024-02-18 14:50:14 +08:00
parent 0bc6189c47
commit 98111dad4e
4 changed files with 283 additions and 3 deletions

View File

@ -588,6 +588,76 @@ interface ActionSheetOptions
* @since 12
*/
transition?: TransitionEffect;
/**
* Defines the actionSheet's corner radius.
*
* @type { ?(Dimension | BorderRadiuses) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
cornerRadius?: Dimension | BorderRadiuses;
/**
* Defines the actionSheet's width.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
width?: Dimension;
/**
* Defines the actionSheet's height.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
height?: Dimension;
/**
* Defines the actionSheet's border width.
*
* @type { ?(Dimension | EdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
borderWidth?: Dimension | EdgeWidths;
/**
* Defines the actionSheet's border color.
*
* @type { ?(ResourceColor | EdgeColors) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
borderColor?: ResourceColor | EdgeColors;
/**
* Defines the actionSheet's border style.
*
* @type { ?(BorderStyle | EdgeStyles) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
borderStyle?: BorderStyle | EdgeStyles;
/**
* Defines the actionSheet's shadow.
*
* @type { ?(ShadowOptions | ShadowStyle) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
shadow?: ShadowOptions | ShadowStyle;
}
/**

View File

@ -802,6 +802,76 @@ declare interface AlertDialogParam {
* @since 12
*/
transition?: TransitionEffect;
/**
* Defines the alertDialog's corner radius.
*
* @type { ?(Dimension | BorderRadiuses) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
cornerRadius?: Dimension | BorderRadiuses;
/**
* Defines the alertDialog's width.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
width?: Dimension;
/**
* Defines the alertDialog's height.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
height?: Dimension;
/**
* Defines the alertDialog's border width.
*
* @type { ?(Dimension | EdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
borderWidth?: Dimension | EdgeWidths;
/**
* Defines the alertDialog's border color.
*
* @type { ?(ResourceColor | EdgeColors) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
borderColor?: ResourceColor | EdgeColors;
/**
* Defines the alertDialog's border style.
*
* @type { ?(BorderStyle | EdgeStyles) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
borderStyle?: BorderStyle | EdgeStyles;
/**
* Defines the alertDialog's shadow.
*
* @type { ?(ShadowOptions | ShadowStyle) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
shadow?: ShadowOptions | ShadowStyle;
}
/**

View File

@ -334,7 +334,7 @@ declare interface CustomDialogControllerOptions {
* @since 11
*/
backgroundColor?: ResourceColor;
/**
* Corner radius of dialog.
*
@ -362,7 +362,7 @@ declare interface CustomDialogControllerOptions {
* @crossplatform
* @since 11
*/
isModal?: boolean;
isModal?: boolean;
/**
* Callback function when the CustomDialog interactive dismiss.
@ -373,6 +373,66 @@ declare interface CustomDialogControllerOptions {
* @since 12
*/
onWillDismiss?: (dismissDialog: DismissDialog) => void;
/**
* Defines the custom dialog's width.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
width?: Dimension;
/**
* Defines the custom dialog's height.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
height?: Dimension;
/**
* Defines the custom dialog's border width.
*
* @type { ?(Dimension | EdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
borderWidth?: Dimension | EdgeWidths;
/**
* Defines the custom dialog's border color.
*
* @type { ?(ResourceColor | EdgeColors) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
borderColor?: ResourceColor | EdgeColors;
/**
* Defines the custom dialog's border style.
*
* @type { ?(BorderStyle | EdgeStyles) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
borderStyle?: BorderStyle | EdgeStyles;
/**
* Defines the custom dialog's shadow.
*
* @type { ?(ShadowOptions | ShadowStyle) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
shadow?: ShadowOptions | ShadowStyle;
}
/**
@ -393,7 +453,7 @@ declare interface DismissDialog {
* @since 12
*/
dismiss: () => void;
/**
* Dismiss reason type.
*

View File

@ -593,6 +593,86 @@ declare namespace promptAction {
* @since 12
*/
onWillDismiss?: (dismissDialog: DismissDialog) => void;
/**
* Defines the custom dialog's background color.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
backgroundColor?: ResourceColor;
/**
* Defines the custom dialog's corner radius.
*
* @type { ?(Dimension | BorderRadiuses) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
cornerRadius?: Dimension | BorderRadiuses;
/**
* Defines the custom dialog's width.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
width?: Dimension;
/**
* Defines the custom dialog's height.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
height?: Dimension;
/**
* Defines the custom dialog's border width.
*
* @type { ?(Dimension | EdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
borderWidth?: Dimension | EdgeWidths;
/**
* Defines the custom dialog's border color.
*
* @type { ?(ResourceColor | EdgeColors) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
borderColor?: ResourceColor | EdgeColors;
/**
* Defines the custom dialog's border style.
*
* @type { ?(BorderStyle | EdgeStyles) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
borderStyle?: BorderStyle | EdgeStyles;
/**
* Defines the custom dialog's shadow.
*
* @type { ?(ShadowOptions | ShadowStyle) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
shadow?: ShadowOptions | ShadowStyle;
}
/**