Commit bcc36ebc authored by Vladislav Bakaev's avatar Vladislav Bakaev Committed by GitHub

fix: re-name error popconfirm event name (#20240)

parent 2acff774
...@@ -24,10 +24,10 @@ You can customise Popconfirm like: ...@@ -24,10 +24,10 @@ You can customise Popconfirm like:
```html ```html
<template> <template>
<el-popconfirm <el-popconfirm
confirmButtonText='OK' confirm-button-text='OK'
cancelButtonText='No, Thanks' cancel-button-text='No, Thanks'
icon="el-icon-info" icon="el-icon-info"
iconColor="red" icon-color="red"
title="Are you sure to delete this?" title="Are you sure to delete this?"
> >
<el-button slot="reference">Delete</el-button> <el-button slot="reference">Delete</el-button>
...@@ -40,13 +40,13 @@ You can customise Popconfirm like: ...@@ -40,13 +40,13 @@ You can customise Popconfirm like:
| Attribute | Description | Type | Accepted Values | Default | | Attribute | Description | Type | Accepted Values | Default |
|--------------------|----------------------------------------------------------|-------------------|-------------|--------| |--------------------|----------------------------------------------------------|-------------------|-------------|--------|
| title | Title | String | — | — | | title | Title | String | — | — |
| confirmButtonText | Confirm button text | String | — | — | | confirm-button-text | Confirm button text | String | — | — |
| cancelButtonText | Cancel button text | String | — | — | | cancel-button-text | Cancel button text | String | — | — |
| confirmButtonType | Confirm button type | String | — | Primary | | confirm-button-type | Confirm button type | String | — | Primary |
| cancelButtonType | Cancel button type | String | — | Text | | cancel-button-type | Cancel button type | String | — | Text |
| icon | Icon | String | — | el-icon-question | | icon | Icon | String | — | el-icon-question |
| iconColor | Icon color | String | — | #f90 | | icon-color | Icon color | String | — | #f90 |
| hideIcon | is hide Icon | Boolean | — | false | | hide-icon | is hide Icon | Boolean | — | false |
### Slot ### Slot
| Name | Description | | Name | Description |
...@@ -56,5 +56,5 @@ You can customise Popconfirm like: ...@@ -56,5 +56,5 @@ You can customise Popconfirm like:
### Events ### Events
| Event Name | Description | Parameters | | Event Name | Description | Parameters |
|---------|--------|---------| |---------|--------|---------|
| onConfirm | triggers when click confirm button | — | | confirm | triggers when click confirm button | — |
| onCancel | triggers when click cancel button | — | | cancel | triggers when click cancel button | — |
\ No newline at end of file \ No newline at end of file
...@@ -25,10 +25,10 @@ Se puede personalizar Popconfirm así: ...@@ -25,10 +25,10 @@ Se puede personalizar Popconfirm así:
```html ```html
<template> <template>
<el-popconfirm <el-popconfirm
confirmButtonText='OK' confirm-button-text='OK'
cancelButtonText='No, Thanks' cancel-button-text='No, Thanks'
icon="el-icon-info" icon="el-icon-info"
iconColor="red" icon-color="red"
title="Are you sure to delete this?" title="Are you sure to delete this?"
> >
<el-button slot="reference">Delete</el-button> <el-button slot="reference">Delete</el-button>
...@@ -41,13 +41,13 @@ Se puede personalizar Popconfirm así: ...@@ -41,13 +41,13 @@ Se puede personalizar Popconfirm así:
| Atributo | Descripción | Tipo | Valores aceptados | Por defecto | | Atributo | Descripción | Tipo | Valores aceptados | Por defecto |
|--------------------|----------------------------------------------------------|-------------------|-------------|--------| |--------------------|----------------------------------------------------------|-------------------|-------------|--------|
| title | Titulo | String | — | — | | title | Titulo | String | — | — |
| confirmButtonText | Texto del botón de confirmación | String | — | — | | confirm-button-text | Texto del botón de confirmación | String | — | — |
| cancelButtonText | Texto del botón de cancelación | String | — | — | | cancel-button-text | Texto del botón de cancelación | String | — | — |
| confirmButtonType | Tipo del botón de confirmación | String | — | Primary | | confirm-button-type | Tipo del botón de confirmación | String | — | Primary |
| cancelButtonType | Tipo del botón de cancelación | String | — | Text | | cancel-button-type | Tipo del botón de cancelación | String | — | Text |
| icon | Icono | String | — | el-icon-question | | icon | Icono | String | — | el-icon-question |
| iconColor | Color icono | String | — | #f90 | | icon-color | Color icono | String | — | #f90 |
| hideIcon | ¿Es un icono oculto? | Boolean | — | false | | hide-icon | ¿Es un icono oculto? | Boolean | — | false |
### Slot ### Slot
| Nombre | Descripción | | Nombre | Descripción |
...@@ -57,5 +57,5 @@ Se puede personalizar Popconfirm así: ...@@ -57,5 +57,5 @@ Se puede personalizar Popconfirm así:
### Eventos ### Eventos
| Nombre Evento | Descripción | Parámetros | | Nombre Evento | Descripción | Parámetros |
|---------|--------|---------| |---------|--------|---------|
| onConfirm | Se activa cuando se pulsa el botón de confirmación | — | | confirm | Se activa cuando se pulsa el botón de confirmación | — |
| onCancel | Se activa cuando se pulsa el botón de cancelación | — | | cancel | Se activa cuando se pulsa el botón de cancelación | — |
\ No newline at end of file \ No newline at end of file
...@@ -24,10 +24,10 @@ You can customise Popconfirm like: ...@@ -24,10 +24,10 @@ You can customise Popconfirm like:
```html ```html
<template> <template>
<el-popconfirm <el-popconfirm
confirmButtonText='OK' confirm-button-text='OK'
cancelButtonText='No, Thanks' cancel-button-text='No, Thanks'
icon="el-icon-info" icon="el-icon-info"
iconColor="red" icon-color="red"
title="Are you sure to delete this?" title="Are you sure to delete this?"
> >
<el-button slot="reference">Delete</el-button> <el-button slot="reference">Delete</el-button>
...@@ -40,13 +40,13 @@ You can customise Popconfirm like: ...@@ -40,13 +40,13 @@ You can customise Popconfirm like:
| Attribute | Description | Type | Accepted Values | Default | | Attribute | Description | Type | Accepted Values | Default |
|--------------------|----------------------------------------------------------|-------------------|-------------|--------| |--------------------|----------------------------------------------------------|-------------------|-------------|--------|
| title | Title | String | — | — | | title | Title | String | — | — |
| confirmButtonText | Confirm button text | String | — | — | | confirm-button-text | Confirm button text | String | — | — |
| cancelButtonText | Cancel button text | String | — | — | | cancel-button-text | Cancel button text | String | — | — |
| confirmButtonType | Confirm button type | String | — | Primary | | confirm-button-type | Confirm button type | String | — | Primary |
| cancelButtonType | Cancel button type | String | — | Text | | cancel-button-type | Cancel button type | String | — | Text |
| icon | Icon | String | — | el-icon-question | | icon | Icon | String | — | el-icon-question |
| iconColor | Icon color | String | — | #f90 | | icon-color | Icon color | String | — | #f90 |
| hideIcon | is hide Icon | Boolean | — | false | | hide-icon | is hide Icon | Boolean | — | false |
### Slot ### Slot
| Name | Description | | Name | Description |
...@@ -56,5 +56,5 @@ You can customise Popconfirm like: ...@@ -56,5 +56,5 @@ You can customise Popconfirm like:
### Events ### Events
| Event Name | Description | Parameters | | Event Name | Description | Parameters |
|---------|--------|---------| |---------|--------|---------|
| onConfirm | triggers when click confirm button | — | | confirm | triggers when click confirm button | — |
| onCancel | triggers when click cancel button | — | | cancel | triggers when click cancel button | — |
\ No newline at end of file \ No newline at end of file
...@@ -24,10 +24,10 @@ Popconfirm 的属性与 Popover 很类似,因此对于重复属性,请参考 ...@@ -24,10 +24,10 @@ Popconfirm 的属性与 Popover 很类似,因此对于重复属性,请参考
```html ```html
<template> <template>
<el-popconfirm <el-popconfirm
confirmButtonText='好的' confirm-button-text='好的'
cancelButtonText='不用了' cancel-button-text='不用了'
icon="el-icon-info" icon="el-icon-info"
iconColor="red" icon-color="red"
title="这是一段内容确定删除吗?" title="这是一段内容确定删除吗?"
> >
<el-button slot="reference">删除</el-button> <el-button slot="reference">删除</el-button>
...@@ -40,13 +40,13 @@ Popconfirm 的属性与 Popover 很类似,因此对于重复属性,请参考 ...@@ -40,13 +40,13 @@ Popconfirm 的属性与 Popover 很类似,因此对于重复属性,请参考
| 参数 | 说明 | 类型 | 可选值 | 默认值 | | 参数 | 说明 | 类型 | 可选值 | 默认值 |
|--------------------|----------------------------------------------------------|-------------------|-------------|--------| |--------------------|----------------------------------------------------------|-------------------|-------------|--------|
| title | 标题 | String | — | — | | title | 标题 | String | — | — |
| confirmButtonText | 确认按钮文字 | String | — | — | | confirm-button-text | 确认按钮文字 | String | — | — |
| cancelButtonText | 取消按钮文字 | String | — | — | | cancel-button-text | 取消按钮文字 | String | — | — |
| confirmButtonType | 确认按钮类型 | String | — | Primary | | confirm-button-type | 确认按钮类型 | String | — | Primary |
| cancelButtonType | 取消按钮类型 | String | — | Text | | cancel-button-type | 取消按钮类型 | String | — | Text |
| icon | Icon | String | — | el-icon-question | | icon | Icon | String | — | el-icon-question |
| iconColor | Icon 颜色 | String | — | #f90 | | icon-color | Icon 颜色 | String | — | #f90 |
| hideIcon | 是否隐藏 Icon | Boolean | — | false | | hide-icon | 是否隐藏 Icon | Boolean | — | false |
### Slot ### Slot
| 参数 | 说明 | | 参数 | 说明 |
...@@ -56,5 +56,5 @@ Popconfirm 的属性与 Popover 很类似,因此对于重复属性,请参考 ...@@ -56,5 +56,5 @@ Popconfirm 的属性与 Popover 很类似,因此对于重复属性,请参考
### Events ### Events
| 事件名称 | 说明 | 回调参数 | | 事件名称 | 说明 | 回调参数 |
|---------|--------|---------| |---------|--------|---------|
| onConfirm | 点击确认按钮时触发 | — | | confirm | 点击确认按钮时触发 | — |
| onCancel | 点击取消按钮时触发 | — | | cancel | 点击取消按钮时触发 | — |
\ No newline at end of file \ No newline at end of file
...@@ -87,11 +87,11 @@ export default { ...@@ -87,11 +87,11 @@ export default {
methods: { methods: {
confirm() { confirm() {
this.visible = false; this.visible = false;
this.$emit('onConfirm'); this.$emit('confirm');
}, },
cancel() { cancel() {
this.visible = false; this.visible = false;
this.$emit('onCancel'); this.$emit('cancel');
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment