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

@@ -204,7 +204,6 @@ export function useDataFormSchema(): VbenFormSchema[] {
return {
api: getSimpleDictTypeList,
placeholder: '请输入字典类型',
class: 'w-full',
labelField: 'name',
valueField: 'type',
disabled: !!values.id,

View File

@@ -166,7 +166,6 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'AutoComplete',
componentProps: {
allowClear: true,
class: 'w-full',
filterOption(input: string, option: { value: string }) {
return option.value.toLowerCase().includes(input.toLowerCase());
},

View File

@@ -200,7 +200,6 @@ export function useSendNotifyFormSchema(): VbenFormSchema[] {
component: 'ApiSelect',
componentProps: {
api: getSimpleUserList,
class: 'w-full',
labelField: 'nickname',
valueField: 'id',
placeholder: '请选择接收人',

View File

@@ -26,6 +26,8 @@ const [Form, formApi] = useVbenForm({
componentProps: {
class: 'w-full',
},
formItemClass: 'col-span-2',
labelWidth: 80,
},
layout: 'horizontal',
schema: useFormSchema(),