弹窗 Dialog
基本用法
自定义头部的操作按钮
自定义底部内容
全屏的弹窗
嵌套的弹窗
API
Dialog Props
| 参数名 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
modelValue(v-model) | 弹窗的显隐状态 | boolean | ||
| title | 弹窗的标题 | string | ||
| width | 弹窗宽度 | string | 50% | |
| center | 弹窗整体是否水平垂直居中 | boolean | true | |
| top | 弹窗距离顶部的距离 | string | true | |
| fullscreen | 是否全屏展示 | boolean | false | |
| fixed | 是否禁止滚动穿透 | boolean | true | |
| customClass | 自定义弹窗的类名 | string | ||
| closeOnClickBackdrop | 点击遮罩层时是否同时关闭弹窗 | boolean | true | |
| showClose | 是否显示关闭按钮 | boolean | true | |
| headerActions | header 区域的操作按钮组 | array | Array<{text: string, buttonProps: ButtonTypes.IButtonProps, handler: (...args: any[]) => void;}> | [] |
| beforeClose | 关闭弹窗前要触发的事件(执行 done 回调则表明关闭弹窗,反之则不关闭) | function |
Dialog Slots
| 插槽名 | 说明 | 子标签 |
|---|---|---|
| default | 默认插槽 | |
| title | 自定义标题 | |
| footer | 自定义尾部内容 |
