From 2a2997131873a4836303ac2411371dd78726f6f9 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Fri, 31 Oct 2025 11:58:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(element-plus-adapter,=20from,=20tdesign-vu?= =?UTF-8?q?e-adapter):=20button=E5=85=BC=E5=AE=B9type=3Ddefault=E5=92=8Cty?= =?UTF-8?q?pe=E4=B8=BA=E7=A9=BA=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/element-plus-adapter/src/index.ts | 7 ++++++- packages/form/src/FormDialog.vue | 2 +- packages/form/src/FormDrawer.vue | 2 +- packages/tdesign-vue-next-adapter/src/index.ts | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/element-plus-adapter/src/index.ts b/packages/element-plus-adapter/src/index.ts index fd5b3362..0075f4a7 100644 --- a/packages/element-plus-adapter/src/index.ts +++ b/packages/element-plus-adapter/src/index.ts @@ -111,7 +111,12 @@ const adapter: DesignPluginOptions = { button: { component: ElButton as any, - props: (props: ButtonProps) => props, + props: (props: ButtonProps) => { + return { + ...props, + type: props.type === 'default' ? '' : props.type, + }; + }, }, card: { diff --git a/packages/form/src/FormDialog.vue b/packages/form/src/FormDialog.vue index d818f111..93f4c546 100644 --- a/packages/form/src/FormDialog.vue +++ b/packages/form/src/FormDialog.vue @@ -42,7 +42,7 @@ - 取 消 + 取 消 上一步 diff --git a/packages/form/src/FormDrawer.vue b/packages/form/src/FormDrawer.vue index 7e62b1c0..6b2c3039 100644 --- a/packages/form/src/FormDrawer.vue +++ b/packages/form/src/FormDrawer.vue @@ -42,7 +42,7 @@ - 关闭 + 关闭 {{ confirmText }} diff --git a/packages/tdesign-vue-next-adapter/src/index.ts b/packages/tdesign-vue-next-adapter/src/index.ts index 075e2e36..01d8e10c 100644 --- a/packages/tdesign-vue-next-adapter/src/index.ts +++ b/packages/tdesign-vue-next-adapter/src/index.ts @@ -180,7 +180,7 @@ const adapter: any = { button: { component: TButton, props: (props: ButtonProps) => ({ - theme: props.type, + theme: props.type ? props.type : 'default', size: props.size === 'default' ? 'medium' : props.size, icon: props.icon ? () => h(Icon, null, { default: () => h(props.icon) }) : undefined, variant: props.link || props.text ? 'text' : props.variant || 'base',