From 9a75421eaa780491d0e551504ee90575ebc7a2df Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Wed, 23 Apr 2025 17:06:31 +0800 Subject: [PATCH] style: useVbenForm commonConfig --- apps/web-antd/src/views/system/post/data.ts | 3 --- apps/web-antd/src/views/system/post/modules/form.vue | 9 ++++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/views/system/post/data.ts b/apps/web-antd/src/views/system/post/data.ts index 9c4969b66..17d4416da 100644 --- a/apps/web-antd/src/views/system/post/data.ts +++ b/apps/web-antd/src/views/system/post/data.ts @@ -39,9 +39,6 @@ export function useFormSchema(): VbenFormSchema[] { component: 'InputNumber', componentProps: { min: 0, - class: 'w-full', - controlsPosition: 'right', - placeholder: '请输入显示顺序', }, rules: 'required', }, diff --git a/apps/web-antd/src/views/system/post/modules/form.vue b/apps/web-antd/src/views/system/post/modules/form.vue index 4cf5d08e5..29922f339 100644 --- a/apps/web-antd/src/views/system/post/modules/form.vue +++ b/apps/web-antd/src/views/system/post/modules/form.vue @@ -22,6 +22,13 @@ const getTitle = computed(() => { }); const [Form, formApi] = useVbenForm({ + commonConfig: { + componentProps: { + class: 'w-full', + }, + formItemClass: 'col-span-2', + labelWidth: 80, + }, layout: 'horizontal', schema: useFormSchema(), showDefaultActions: false, @@ -71,7 +78,7 @@ const [Modal, modalApi] = useVbenModal({