From 507e51a2dc91defb67087a539d786d01ef95b9ad Mon Sep 17 00:00:00 2001 From: roymondchen Date: Thu, 23 Oct 2025 19:23:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(design,=20element-plus-adapter,=20tdesign-?= =?UTF-8?q?vue-next-adapter):=20=E6=96=B0=E5=A2=9Epopconfirm=E7=BB=84?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/design/src/Popconfirm.vue | 42 +++++++++++++++++++ packages/design/src/index.ts | 1 + packages/design/src/types.ts | 22 ++++++++++ packages/element-plus-adapter/src/index.ts | 7 ++++ .../src/Popconfirm.vue | 29 +++++++++++++ 5 files changed, 101 insertions(+) create mode 100644 packages/design/src/Popconfirm.vue create mode 100644 packages/tdesign-vue-next-adapter/src/Popconfirm.vue diff --git a/packages/design/src/Popconfirm.vue b/packages/design/src/Popconfirm.vue new file mode 100644 index 00000000..9d4aaf5f --- /dev/null +++ b/packages/design/src/Popconfirm.vue @@ -0,0 +1,42 @@ + + + diff --git a/packages/design/src/index.ts b/packages/design/src/index.ts index 088e2802..fa6b56a7 100644 --- a/packages/design/src/index.ts +++ b/packages/design/src/index.ts @@ -52,6 +52,7 @@ export { default as TMagicTag } from './Tag.vue'; export { default as TMagicTimePicker } from './TimePicker.vue'; export { default as TMagicTooltip } from './Tooltip.vue'; export { default as TMagicUpload } from './Upload.vue'; +export { default as TMagicPopconfirm } from './Popconfirm.vue'; export const tMagicMessage = { error: (msg: string) => { diff --git a/packages/design/src/types.ts b/packages/design/src/types.ts index 773d0e7c..6aa27c69 100644 --- a/packages/design/src/types.ts +++ b/packages/design/src/types.ts @@ -227,6 +227,23 @@ export interface PaginationProps { total?: number; } +export interface PopconfirmProps { + title?: string; + placement?: + | 'top' + | 'left' + | 'right' + | 'bottom' + | 'top-left' + | 'top-right' + | 'bottom-left' + | 'bottom-right' + | 'left-top' + | 'left-bottom' + | 'right-top' + | 'right-bottom'; +} + export interface PopoverProps { placement?: Placement; width?: string | number; @@ -677,6 +694,11 @@ export interface Components { | string; props: (props: UploadProps) => UploadProps; }; + + popconfirm: { + component: DefineComponent | string; + props: (props: PopconfirmProps) => PopconfirmProps; + }; } export interface DesignPluginOptions { diff --git a/packages/element-plus-adapter/src/index.ts b/packages/element-plus-adapter/src/index.ts index 9f3262c6..d98f1c65 100644 --- a/packages/element-plus-adapter/src/index.ts +++ b/packages/element-plus-adapter/src/index.ts @@ -27,6 +27,7 @@ import { ElOption, ElOptionGroup, ElPagination, + ElPopconfirm, ElRadio, ElRadioButton, ElRadioGroup, @@ -72,6 +73,7 @@ import type { OptionGroupProps, OptionProps, PaginationProps, + PopconfirmProps, RadioButtonProps, RadioGroupProps, RadioProps, @@ -305,6 +307,11 @@ const adapter: DesignPluginOptions = { component: ElUpload as any, props: (props: UploadProps) => props, }, + + popconfirm: { + component: ElPopconfirm as any, + props: (props: PopconfirmProps) => props, + }, }, loading: ElLoading.directive, }; diff --git a/packages/tdesign-vue-next-adapter/src/Popconfirm.vue b/packages/tdesign-vue-next-adapter/src/Popconfirm.vue new file mode 100644 index 00000000..6fafc9c6 --- /dev/null +++ b/packages/tdesign-vue-next-adapter/src/Popconfirm.vue @@ -0,0 +1,29 @@ + + +