Skip to content

ProDialog 超级弹框

基础用法

Attributes

属性名说明类型默认值
title顶部标题string''
fullscreen是否默认全屏booleanfalse
fullscreenIcon是否显示渲染全屏图标booleantrue
height内容高度string / number400
maxHeight内容最大高度string / number
heightOffsetInFullscreen全屏时内容高度偏移量number0
showFooter是否渲染底部booleantrue
footerAlign底部对齐方式string right
confirmLoading确认按钮 loadingbooleanfalse
confirmText确认按钮文字string确认
cancelText关闭按钮文字string关闭
...其他扩展属性,支持所有 ElDialog Attributes......

函数式弹框独有的属性

属性名说明类型默认值
render自定义内容渲染function
renderHeader自定义头部渲染function
footerTopRender自定义底部上方渲染function
renderFooterBefore自定义底部前渲染function
renderFooter自定义底部渲染function
renderFooterAfter自定义底部后渲染function
onConfirm确认按钮点击事件function
onCancel关闭按钮点击事件function
onFullscreen全屏切换事件function

RenderTypes 类型

渲染函数的返回值的类型

ts
/**
 * 渲染函数的返回值的类型
 */
export type RenderTypes = string | VNode | JSX.Element | Component;

DialogRenderParams 类型

渲染函数的参数类型

ts
/**
 * Render 相关函数的参数
 */
export type DialogRenderParams = {
  handleConfirm: () => void;
  handleCancel: () => void;
};

Events

ProDialog 组件式弹框使用,如果是函数式弹框,请使用上方的 onXxx 事件。

名称说明类型
cancel取消事件function
confirm确认事件function
fullscreen全屏切换事件function

Slots

ProDialog 组件式弹框使用,如果是函数式弹框,请使用上方的 renderXxx 事件。

插槽名说明作用域插槽参数
header自定义头部object
header-title自定义头部标题
fullscreen-icon自定义全屏图标object
footer-top自定义底部上方
footer-before自定义底部前object
footer自定义底部object
footer-after自定义底部后object
...其他扩展属性,支持所有 ElDialog Slots...

Exposes

ProDialog 组件式弹框使用。

名称说明类型
elDialogInstanceel-dialog 组件实例object
handleConfirm确认事件处理function
handleCancel取消事件处理function
open打开弹窗function
close关闭弹窗function