mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-02 03:08:21 +08:00
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:
parent
6c752f6676
commit
c6b43df7b3
@ -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
|
||||
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user