feat: add useVbenForm common config class

This commit is contained in:
xingyu4j
2025-04-28 11:42:33 +08:00
parent bb72b91a1d
commit 3e6d9cb1cd
20 changed files with 85 additions and 17 deletions

View File

@@ -36,7 +36,6 @@ export function useFormSchema(): VbenFormSchema[] {
componentProps: {
options: getDictOptions(DICT_TYPE.INFRA_FILE_STORAGE, 'number'),
placeholder: '请选择存储器',
class: 'w-full',
},
rules: 'required',
dependencies: {
@@ -87,7 +86,6 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'InputNumber',
componentProps: {
min: 0,
class: 'w-full',
controlsPosition: 'right',
placeholder: '请输入主机端口',
},

View File

@@ -27,7 +27,11 @@ const getTitle = computed(() => {
const [Form, formApi] = useVbenForm({
commonConfig: {
labelWidth: 120,
componentProps: {
class: 'w-full',
},
formItemClass: 'col-span-2',
labelWidth: 80,
},
layout: 'horizontal',
schema: useFormSchema(),