From b22d900e2778a5fcdb3d134e778efeb9dc6ddb39 Mon Sep 17 00:00:00 2001 From: Netfan Date: Tue, 17 Dec 2024 20:51:17 +0800 Subject: [PATCH] feat: form compact mode support (#5165) --- docs/src/components/common-ui/vben-form.md | 7 +++++++ .../@core/ui-kit/form-ui/src/components/form-actions.vue | 6 +++++- .../@core/ui-kit/form-ui/src/form-render/form-field.vue | 6 ++++-- packages/@core/ui-kit/form-ui/src/types.ts | 4 ++++ packages/effects/plugins/src/vxe-table/use-vxe-grid.vue | 7 ++++++- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/docs/src/components/common-ui/vben-form.md b/docs/src/components/common-ui/vben-form.md index 80636963..8d27c08d 100644 --- a/docs/src/components/common-ui/vben-form.md +++ b/docs/src/components/common-ui/vben-form.md @@ -357,6 +357,13 @@ export interface FormCommonConfig { * 所有表单项的props */ componentProps?: ComponentProps; + /** + * 是否紧凑模式(移除表单底部为显示校验错误信息所预留的空间)。 + * 在有设置校验规则的场景下,建议不要将其设置为true + * 默认为false。但用作表格的搜索表单时,默认为true + * @default false + */ + compact?: boolean; /** * 所有表单项的控件样式 */ diff --git a/packages/@core/ui-kit/form-ui/src/components/form-actions.vue b/packages/@core/ui-kit/form-ui/src/components/form-actions.vue index ac5505d5..b9a878e8 100644 --- a/packages/@core/ui-kit/form-ui/src/components/form-actions.vue +++ b/packages/@core/ui-kit/form-ui/src/components/form-actions.vue @@ -138,7 +138,11 @@ defineExpose({