主题
Popconfirm 气泡确认框
使用
点击某个元素弹出一个简单的气泡确认框
基础用法
Popconfirm
的属性与 Popover
很类似, 因此对于重复属性,请参考 Popover
的文档,在此文档中不做详尽解释。
在 Popconfirm
中,只有 title
属性可用,content
属性会被忽略。
自定义弹出框的内容
可以在 Popconfirm
中自定义内容。
多种让 Popconfirm 出现的方法
点击按钮触发事件
API
Popconfirm Props
参数名 | 描述 | 类型 | 默认值 |
---|---|---|---|
title | 标题 | string | - |
confirm-button-text | 确认按钮文字 | string | - |
cancel-button-text | 取消按钮文字 | string | - |
confirm-button-type | 确认按钮类型 | enum | primary |
cancel-button-type | 取消按钮类型 | enum | text |
icon | 自定义图标 | string | Component | - |
icon-color | 图标颜色 | string | - |
hide-icon | 是否隐藏图标 | boolean | false |
hide-after | 关闭时的延迟 | number | 200 |
teleported | 是否将popover的下拉列表插入至body元素 | boolean | true |
persistent | 当popover组件长时间不触发且persistent属性设置为false时, popover将会被删除 | boolean | false |
width | 弹层宽度 | string | number | 150 |
Popconfirm Events
事件名 | 描述 | 类型 |
---|---|---|
confirm | 点击确认按钮时触发 | Function |
cancel | 点击取消按钮时触发 | Function |
Popconfirm Slots
插槽名 | 描述 | 参数 |
---|---|---|
reference | 触发Popconfirm显示的HTML元素 | - |
actions | 页脚的内容 | object |