From 310054b7d63e688c349142c9b7767fc5f8a2f766 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Thu, 20 Nov 2025 17:57:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(form):=20form=20dialog=E6=96=B0=E5=A2=9Esh?= =?UTF-8?q?ow=20close/show=20cancel=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/design/src/types.ts | 1 + packages/form/src/FormDialog.vue | 7 ++++++- packages/tdesign-vue-next-adapter/src/Dialog.vue | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/design/src/types.ts b/packages/design/src/types.ts index bc2abd72..3eeea05b 100644 --- a/packages/design/src/types.ts +++ b/packages/design/src/types.ts @@ -128,6 +128,7 @@ export interface DialogProps { closeOnClickModal?: boolean; closeOnPressEscape?: boolean; destroyOnClose?: boolean; + showClose?: boolean; } export interface DividerProps { diff --git a/packages/form/src/FormDialog.vue b/packages/form/src/FormDialog.vue index fec88ad5..25705a68 100644 --- a/packages/form/src/FormDialog.vue +++ b/packages/form/src/FormDialog.vue @@ -11,6 +11,7 @@ :close-on-click-modal="closeOnClickModal" :close-on-press-escape="closeOnPressEscape" :destroy-on-close="destroyOnClose" + :show-close="showClose" @close="closeHandler" >
- 取 消 + 取 消 上一步 @@ -92,6 +93,8 @@ const props = withDefaults( closeOnClickModal?: boolean; closeOnPressEscape?: boolean; destroyOnClose?: boolean; + showClose?: boolean; + showCancel?: boolean; }>(), { config: () => [], @@ -100,6 +103,8 @@ const props = withDefaults( closeOnClickModal: false, closeOnPressEscape: false, destroyOnClose: false, + showClose: true, + showCancel: true, }, ); diff --git a/packages/tdesign-vue-next-adapter/src/Dialog.vue b/packages/tdesign-vue-next-adapter/src/Dialog.vue index 0d9c0fe0..11d652f3 100644 --- a/packages/tdesign-vue-next-adapter/src/Dialog.vue +++ b/packages/tdesign-vue-next-adapter/src/Dialog.vue @@ -5,6 +5,7 @@ :header="title" :width="width" :mode="fullscreen ? 'full-screen' : 'modal'" + :close-btn="showClose" :close-on-overlay-click="closeOnClickModal" :close-on-esc-keydown="closeOnPressEscape" :destroy-on-close="destroyOnClose"