mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-03 19:58:09 +08:00
fix(components): [popconfirm] text button type (#7526)
This commit is contained in:
parent
7dc51f57e6
commit
119024eff0
@ -4,24 +4,20 @@ import { buildProps, definePropType, iconPropType } from '@element-plus/utils'
|
||||
import { useTooltipContentProps } from '@element-plus/components/tooltip'
|
||||
import type { Component, ExtractPropTypes } from 'vue'
|
||||
|
||||
const popConfirmButtonTypes = [...buttonTypes, 'text'] as const
|
||||
|
||||
export const popconfirmProps = buildProps({
|
||||
title: {
|
||||
type: String,
|
||||
},
|
||||
confirmButtonText: {
|
||||
type: String,
|
||||
},
|
||||
cancelButtonText: {
|
||||
type: String,
|
||||
},
|
||||
title: String,
|
||||
confirmButtonText: String,
|
||||
cancelButtonText: String,
|
||||
confirmButtonType: {
|
||||
type: String,
|
||||
values: buttonTypes,
|
||||
values: popConfirmButtonTypes,
|
||||
default: 'primary',
|
||||
},
|
||||
cancelButtonType: {
|
||||
type: String,
|
||||
values: buttonTypes,
|
||||
values: popConfirmButtonTypes,
|
||||
default: 'text',
|
||||
},
|
||||
icon: {
|
||||
|
@ -23,10 +23,20 @@
|
||||
{{ title }}
|
||||
</div>
|
||||
<div :class="ns.e('action')">
|
||||
<el-button size="small" :type="cancelButtonType" @click="cancel">
|
||||
<el-button
|
||||
size="small"
|
||||
:type="cancelButtonType === 'text' ? '' : cancelButtonType"
|
||||
:text="cancelButtonType === 'text'"
|
||||
@click="cancel"
|
||||
>
|
||||
{{ finalCancelButtonText }}
|
||||
</el-button>
|
||||
<el-button size="small" :type="confirmButtonType" @click="confirm">
|
||||
<el-button
|
||||
size="small"
|
||||
:type="confirmButtonType === 'text' ? '' : confirmButtonType"
|
||||
:text="confirmButtonType === 'text'"
|
||||
@click="confirm"
|
||||
>
|
||||
{{ finalConfirmButtonText }}
|
||||
</el-button>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user