Skip to content

Popconfirm 气泡确认框

使用
import { KPopconfirm } from "@ksware/ksw-ux";

点击某个元素弹出一个简单的气泡确认框

基础用法

Popconfirm 的属性与 Popover 很类似, 因此对于重复属性,请参考 Popover 的文档,在此文档中不做详尽解释。

Popconfirm 中,只有 title 属性可用,content 属性会被忽略。

自定义弹出框的内容

可以在 Popconfirm 中自定义内容。

多种让 Popconfirm 出现的方法

点击按钮触发事件

API

Props

参数名描述类型默认值
title标题string-
confirm-button-text确认按钮文字string-
cancel-button-text取消按钮文字string-
confirm-button-type确认按钮类型enumprimary
cancel-button-type取消按钮类型enumtext
icon自定义图标string | Component-
icon-color图标颜色string-
hide-icon是否隐藏图标booleanfalse
hide-after关闭时的延迟number200
teleported是否将popover的下拉列表插入至body元素booleantrue
persistent当popover组件长时间不触发且persistent属性设置为false时, popover将会被删除booleanfalse
width弹层宽度string | number150

Events

事件名描述类型
confirm点击确认按钮时触发Function
cancel点击取消按钮时触发Function

Slots

插槽名描述参数
reference触发Popconfirm显示的HTML元素-
actions页脚的内容object