# Dialog对话框
# ✨简单用法
Dialog 弹出一个对话框,可设置显示的内容。
复制代码
# ✨自定义内容
Dialog 组件的内容可以是任意的,下面是使用wb-input的案例。
站点名称
站点网址
复制代码
# ✨支持不同宽度
dialog同时也支持不同宽度展示,通过dialogWidth
属性设置,默认是30%。
复制代码
# 📌 Dialog Attributes
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
visible | 是否显示 Dialog | boolean | — | false |
title | Dialog 的标题,也可通过具名 slot 传入 | string | — | — |
showClose | 是否显示关闭按钮 | boolean | — | true |
modal | 是否开启背景遮罩层 | boolean | — | true |
dialogWidth | Dialog 的宽度 | string | — | 30% |
closeBefore | 关闭前的回调,会暂停 Dialog 的关闭 | function | — | — |
# 📌 Dialog Slot
name | 说明 |
---|---|
title | Dialog 的标题 |
— | Dialog 的内容区 |
footer | Dialog 的底部按钮操作区 |