feat: 增加 useVbenForm 样式,去掉data.ts 中 字段class

This commit is contained in:
xingyu4j
2025-04-27 14:59:53 +08:00
parent 2a805f560f
commit 1c2da07ded
37 changed files with 168 additions and 93 deletions

View File

@@ -239,7 +239,6 @@ export function useDataFormSchema(): VbenFormSchema[] {
component: 'InputNumber',
componentProps: {
placeholder: '请输入显示排序',
class: 'w-full',
},
rules: 'required',
},
@@ -262,7 +261,6 @@ export function useDataFormSchema(): VbenFormSchema[] {
componentProps: {
options: colorOptions,
placeholder: '请选择颜色类型',
class: 'w-full',
},
},
{

View File

@@ -28,6 +28,13 @@ const getTitle = computed(() => {
});
const [Form, formApi] = useVbenForm({
commonConfig: {
componentProps: {
class: 'w-full',
},
formItemClass: 'col-span-2',
labelWidth: 80,
},
layout: 'horizontal',
schema: useDataFormSchema(),
showDefaultActions: false,

View File

@@ -26,6 +26,13 @@ const getTitle = computed(() => {
});
const [Form, formApi] = useVbenForm({
commonConfig: {
componentProps: {
class: 'w-full',
},
formItemClass: 'col-span-2',
labelWidth: 80,
},
layout: 'horizontal',
schema: useTypeFormSchema(),
showDefaultActions: false,