Commit aa48a6f533dca261d2f8148eaeef5b884004e1d4
1 parent
1080972e
fix: vben 代码生成默认vbenForm 样式
Showing
6 changed files
with
41 additions
and
13 deletions
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/general/views/modules/form_sub_erp.vue.vm
| ... | ... | @@ -24,6 +24,13 @@ |
| 24 | 24 | }); |
| 25 | 25 | |
| 26 | 26 | const [Form, formApi] = useVbenForm({ |
| 27 | + commonConfig: { | |
| 28 | + componentProps: { | |
| 29 | + class: 'w-full', | |
| 30 | + }, | |
| 31 | + formItemClass: 'col-span-2', | |
| 32 | + labelWidth: 80, | |
| 33 | + }, | |
| 27 | 34 | layout: 'horizontal', |
| 28 | 35 | schema: use${subSimpleClassName}FormSchema(), |
| 29 | 36 | showDefaultActions: false | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/general/views/modules/form_sub_normal.vue.vm
| ... | ... | @@ -96,9 +96,16 @@ watch( |
| 96 | 96 | ); |
| 97 | 97 | #else |
| 98 | 98 | const [Form, formApi] = useVbenForm({ |
| 99 | -layout: 'horizontal', | |
| 100 | -schema: use${subSimpleClassName}FormSchema(), | |
| 101 | -showDefaultActions: false | |
| 99 | + commonConfig: { | |
| 100 | + componentProps: { | |
| 101 | + class: 'w-full', | |
| 102 | + }, | |
| 103 | + formItemClass: 'col-span-2', | |
| 104 | + labelWidth: 80, | |
| 105 | + }, | |
| 106 | + layout: 'horizontal', | |
| 107 | + schema: use${subSimpleClassName}FormSchema(), | |
| 108 | + showDefaultActions: false | |
| 102 | 109 | }); |
| 103 | 110 | |
| 104 | 111 | /** 暴露出表单校验方法和表单值获取方法 */ | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/data.ts.vm
| ... | ... | @@ -39,7 +39,6 @@ export function useFormSchema(): VbenFormSchema[] { |
| 39 | 39 | }); |
| 40 | 40 | return handleTree(data); |
| 41 | 41 | }, |
| 42 | - class: 'w-full', | |
| 43 | 42 | labelField: '${treeNameColumn.javaField}', |
| 44 | 43 | valueField: 'id', |
| 45 | 44 | childrenField: 'children', |
| ... | ... | @@ -89,7 +88,6 @@ export function useFormSchema(): VbenFormSchema[] { |
| 89 | 88 | options: [], |
| 90 | 89 | #end |
| 91 | 90 | placeholder: '请选择${comment}', |
| 92 | - class: 'w-full', | |
| 93 | 91 | }, |
| 94 | 92 | #elseif($column.htmlType == "checkbox")## 多选框 |
| 95 | 93 | component: 'Checkbox', |
| ... | ... | @@ -127,7 +125,6 @@ export function useFormSchema(): VbenFormSchema[] { |
| 127 | 125 | component: 'InputNumber', |
| 128 | 126 | componentProps: { |
| 129 | 127 | min: 0, |
| 130 | - class: 'w-full', | |
| 131 | 128 | controlsPosition: 'right', |
| 132 | 129 | placeholder: '请输入${comment}', |
| 133 | 130 | }, |
| ... | ... | @@ -325,7 +322,6 @@ export function use${subSimpleClassName}FormSchema(): VbenFormSchema[] { |
| 325 | 322 | options: [], |
| 326 | 323 | #end |
| 327 | 324 | placeholder: '请选择${comment}', |
| 328 | - class: 'w-full', | |
| 329 | 325 | }, |
| 330 | 326 | #elseif($column.htmlType == "checkbox")## 多选框 |
| 331 | 327 | component: 'Checkbox', |
| ... | ... | @@ -363,7 +359,6 @@ export function use${subSimpleClassName}FormSchema(): VbenFormSchema[] { |
| 363 | 359 | component: 'InputNumber', |
| 364 | 360 | componentProps: { |
| 365 | 361 | min: 0, |
| 366 | - class: 'w-full', | |
| 367 | 362 | controlsPosition: 'right', |
| 368 | 363 | placeholder: '请输入${comment}', |
| 369 | 364 | }, |
| ... | ... | @@ -600,7 +595,6 @@ export function use${subSimpleClassName}GridColumns( |
| 600 | 595 | options: [], |
| 601 | 596 | #end |
| 602 | 597 | placeholder: '请选择${comment}', |
| 603 | - class: 'w-full', | |
| 604 | 598 | }, |
| 605 | 599 | #elseif($column.htmlType == "checkbox")## 多选框 |
| 606 | 600 | component: 'Checkbox', |
| ... | ... | @@ -638,7 +632,6 @@ export function use${subSimpleClassName}GridColumns( |
| 638 | 632 | component: 'InputNumber', |
| 639 | 633 | componentProps: { |
| 640 | 634 | min: 0, |
| 641 | - class: 'w-full', | |
| 642 | 635 | controlsPosition: 'right', |
| 643 | 636 | placeholder: '请输入${comment}', |
| 644 | 637 | }, | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/form.vue.vm
| ... | ... | @@ -55,6 +55,13 @@ const getTitle = computed(() => { |
| 55 | 55 | #end |
| 56 | 56 | |
| 57 | 57 | const [Form, formApi] = useVbenForm({ |
| 58 | + commonConfig: { | |
| 59 | + componentProps: { | |
| 60 | + class: 'w-full', | |
| 61 | + }, | |
| 62 | + formItemClass: 'col-span-2', | |
| 63 | + labelWidth: 80, | |
| 64 | + }, | |
| 58 | 65 | layout: 'horizontal', |
| 59 | 66 | schema: useFormSchema(), |
| 60 | 67 | showDefaultActions: false | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/modules/form_sub_erp.vue.vm
| ... | ... | @@ -24,6 +24,13 @@ |
| 24 | 24 | }); |
| 25 | 25 | |
| 26 | 26 | const [Form, formApi] = useVbenForm({ |
| 27 | + commonConfig: { | |
| 28 | + componentProps: { | |
| 29 | + class: 'w-full', | |
| 30 | + }, | |
| 31 | + formItemClass: 'col-span-2', | |
| 32 | + labelWidth: 80, | |
| 33 | + }, | |
| 27 | 34 | layout: 'horizontal', |
| 28 | 35 | schema: use${subSimpleClassName}FormSchema(), |
| 29 | 36 | showDefaultActions: false | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/modules/form_sub_normal.vue.vm
| ... | ... | @@ -96,9 +96,16 @@ watch( |
| 96 | 96 | ); |
| 97 | 97 | #else |
| 98 | 98 | const [Form, formApi] = useVbenForm({ |
| 99 | -layout: 'horizontal', | |
| 100 | -schema: use${subSimpleClassName}FormSchema(), | |
| 101 | -showDefaultActions: false | |
| 99 | + commonConfig: { | |
| 100 | + componentProps: { | |
| 101 | + class: 'w-full', | |
| 102 | + }, | |
| 103 | + formItemClass: 'col-span-2', | |
| 104 | + labelWidth: 80, | |
| 105 | + }, | |
| 106 | + layout: 'horizontal', | |
| 107 | + schema: use${subSimpleClassName}FormSchema(), | |
| 108 | + showDefaultActions: false | |
| 102 | 109 | }); |
| 103 | 110 | |
| 104 | 111 | /** 暴露出表单校验方法和表单值获取方法 */ | ... | ... |