Toast 用于承载短流程弹窗内容,支持关闭按钮、内容 Slot 和可配置 Footer 操作区。
默认宽度 400px,包含标题、内容 Slot、关闭按钮和底部主按钮。
Footer 展示 checkbox 和单个纵向主按钮。
Footer 展示 checkbox 和上下排列的两个按钮。
Footer 展示 checkbox 和左右排列的两个按钮。
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
| title | 弹窗标题 | string | - | Toast-title |
| subtitle | 标题下方辅助文本 | string | - | '' |
| content | 内容 Slot,可传 DOM 节点、节点数组、函数或文本 | Node | array | function | string | - | null |
| scrollableContent | 内容区为长内容并需要内部滚动时启用独立框架;普通内容保持整体 24px 间距框架 | boolean | true | false | false |
| showClose | 是否展示关闭按钮 | boolean | true | false | true |
| showFooter | 是否展示底部操作区 | boolean | true | false | true |
| footer.layout | 底部按钮排列方式 | string | single-vertical | double-vertical | double-horizontal | single-vertical |
| footer.showCheckbox | 是否展示 checkbox | boolean | true | false | false |
| footer.buttons | 按钮配置,默认调用 Button 组件 | array | - | null |
| footer.slot | Footer 按钮区 Slot,可嵌入组件或自定义内容 | Node | array | function | string | - | null |
| onClose | 关闭按钮点击回调 | function | - | null |