This article: Ele.me UI/element Popconfirm bubble confirmation box confirm/cancel event
Ele.me official website says:
Attributes
parameter | illustrate | type | optional value | Defaults |
---|---|---|---|---|
title | title | String | — | — |
confirm-button-text | Confirm button text | String | — | — |
cancel-button-text | cancel button text | String | — | — |
confirm-button-type | Confirm button type | String | — | Primary |
cancel-button-type | cancel button type | String | — | Text |
icon | Icon | String | — | the-icon-question |
icon-color | icon color | String | — | #f90 |
hide-icon | Whether to hide the Icon | Boolean | — | false |
¶Slot _
parameter | illustrate |
---|---|
reference | The HTML element that triggers the display of Popconfirm |
Method Events
event name | illustrate | callback parameter |
---|---|---|
confirm | Triggered when the confirm button is clicked | — |
cancel | Fired when the cancel button is clicked | — |
Many people will find that they don't know how to use it, or can't use it,
Not much nonsense: the above code:
Method must be @onConfirm="successconfirm()"
@onCancel="successcancel()"
You can't use the method without this:
<!-- 通过弹框 -->
<el-popconfirm
confirm-button-text="确认"
cancel-button-text="取消"
@onConfirm="successconfirm()"
@onCancel="successcancel()"
icon="el-icon-info"
icon-color="red"
title="您确定通过吗?"
>
<el-button
slot="reference"
type="success"
>通过</el-button
>
</el-popconfirm>
<!-- 通过弹框 -->
Fengshangyun Programmer Navigation Station: