refactor(components): [popconfirm] changed button type (#8436)

* refactor(components): [popconfirm] changed button type

* docs: changes to attribute kebab case, add accepted values ​

* fix: remove del tag

* fix: remove del tag
This commit is contained in:
류한경 2022-06-24 13:58:51 +09:00 committed by GitHub
parent 6c752f6676
commit c6b43df7b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 16 deletions

View File

@ -39,18 +39,18 @@ popconfirm/trigger-event
## Attributes
| Attribute | Description | Type | Accepted Values | Default |
| ----------------- | ----------------------------------------------------------------------------------- | ------------------ | --------------- | -------------- |
| title | Title | String | — | — |
| confirmButtonText | Confirm button text | String | — | — |
| cancelButtonText | Cancel button text | String | — | — |
| confirmButtonType | Confirm button type | String | — | Primary |
| cancelButtonType | Cancel button type | String | — | Text |
| icon | Icon Component | String / Component | — | QuestionFilled |
| iconColor | Icon color | String | — | #f90 |
| hideIcon | is hide Icon | Boolean | — | false |
| teleported | whether popconfirm is teleported to the body | boolean | true / false | true |
| persistent | when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed | boolean | — | false |
| Attribute | Description | Type | Accepted Values | Default |
| ------------------- | ----------------------------------------------------------------------------------- | ------------------ | -------------------------------------------------- | -------------- |
| 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 / success / warning / danger / info / text | primary |
| cancel-button-type | Cancel button type | String | primary / success / warning / danger / info / text | text |
| icon | Icon Component | String / Component | — | QuestionFilled |
| icon-color | Icon color | String | — | #f90 |
| hide-icon | is hide Icon | Boolean | — | false |
| teleported | whether popconfirm is teleported to the body | boolean | true / false | true |
| persistent | when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed | boolean | — | false |
## Slots

View File

@ -5,20 +5,18 @@ import { useTooltipContentProps } from '@element-plus/components/tooltip'
import type { Component, ExtractPropTypes } from 'vue'
import type Popconfirm from './popconfirm.vue'
const popConfirmButtonTypes = [...buttonTypes, 'text'] as const
export const popconfirmProps = buildProps({
title: String,
confirmButtonText: String,
cancelButtonText: String,
confirmButtonType: {
type: String,
values: popConfirmButtonTypes,
values: buttonTypes,
default: 'primary',
},
cancelButtonType: {
type: String,
values: popConfirmButtonTypes,
values: buttonTypes,
default: 'text',
},
icon: {