Popconfirm
A simple confirmation dialog of an element click action.
TIP
This component requires the <client-only></client-only>
wrap when used in SSR (eg: Nuxt) and SSG (eg: VitePress).
Basic usage
Popconfirm is similar to Popover. So for some duplicated attributes, please refer to the documentation of Popover.
Customize
You can customize Popconfirm like:
Trigger event
Click the button to trigger the event
API
Attributes
Name | Description | Type | Default |
---|---|---|---|
title | Title | string | — |
confirm-button-text | Confirm button text | string | — |
cancel-button-text | Cancel button text | string | — |
confirm-button-type | Confirm button type | enum | primary |
cancel-button-type | Cancel button type | enum | text |
icon | Icon Component | string / Component | QuestionFilled |
icon-color | Icon color | string | #f90 |
hide-icon | is hide Icon | boolean | false |
hide-after | delay of disappear, in millisecond | number | 200 |
teleported | whether popconfirm is teleported to the body | boolean | true |
persistent | when popconfirm inactive and persistent is false , popconfirm will be destroyed | boolean | false |
width | popconfirm width, min width 150px | string / number | 150 |
Events
Name | Description | Type |
---|---|---|
confirm | triggers when click confirm button | Function |
cancel | triggers when click cancel button | Function |
Slots
Name | Description |
---|---|
reference | HTML element that triggers Popconfirm |