Skip to content

弹窗 Dialog

基本用法

自定义头部的操作按钮

自定义底部内容

全屏的弹窗

嵌套的弹窗

API

Dialog Props

参数名说明类型可选值默认值
modelValue(v-model弹窗的显隐状态boolean
title弹窗的标题string
width弹窗宽度string50%
center弹窗整体是否水平垂直居中booleantrue
top弹窗距离顶部的距离stringtrue
fullscreen是否全屏展示booleanfalse
fixed是否禁止滚动穿透booleantrue
customClass自定义弹窗的类名string
closeOnClickBackdrop点击遮罩层时是否同时关闭弹窗booleantrue
showClose是否显示关闭按钮booleantrue
headerActionsheader 区域的操作按钮组arrayArray<{text: string, buttonProps: ButtonTypes.IButtonProps, handler: (...args: any[]) => void;}>[]
beforeClose关闭弹窗前要触发的事件(执行 done 回调则表明关闭弹窗,反之则不关闭)function

Dialog Slots

插槽名说明子标签
default默认插槽
title自定义标题
footer自定义尾部内容