Dialog 模态框

基础用法

Dialog API

Dialog Props

属性描述类型默认值
modelValue / v-model控制 dialog 的显隐状态booleanfalse
title标题string——
content内容string——
confirmText取消按钮的文字string确定
cancelText确认按钮的文字string取消
showConfirm是否显示确认按钮booleantrue
showCancel是否显示取消按钮booleantrue
width宽度string/ number——
offsetTopdialog 离上的距离string/ number16vh
callbackdialog 关闭时的回调函数Function——
beforeClosedialog 关闭前的回调函数Function——
clickMaskerToClose点击遮罩层是否关闭 dialogbooleantrue
showClose是否显示关闭按钮booleantrue
closeIcon自定义关闭图标icon/ Component——
center是否居中显示内容booleanfalse
transition过渡效果stringn-dialog-fade
maskerClass遮罩层自定义类名string""
masker是否需要遮罩层booleantrue
customClass自定义类名string""

Dialog Emits

事件名描述类型
closedialog 关闭时触发Function
opendialog 打开时触发Function

Dialog Slots

插槽名描述
headerdialog 的头部内容
footerdialog 的底部内容
上次更新时间: