feat: add useVbenForm common config class
This commit is contained in:
@@ -204,7 +204,6 @@ export function useDataFormSchema(): VbenFormSchema[] {
|
||||
return {
|
||||
api: getSimpleDictTypeList,
|
||||
placeholder: '请输入字典类型',
|
||||
class: 'w-full',
|
||||
labelField: 'name',
|
||||
valueField: 'type',
|
||||
disabled: !!values.id,
|
||||
|
||||
@@ -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());
|
||||
},
|
||||
|
||||
@@ -200,7 +200,6 @@ export function useSendNotifyFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
class: 'w-full',
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择接收人',
|
||||
|
||||
@@ -26,6 +26,8 @@ const [Form, formApi] = useVbenForm({
|
||||
componentProps: {
|
||||
class: 'w-full',
|
||||
},
|
||||
formItemClass: 'col-span-2',
|
||||
labelWidth: 80,
|
||||
},
|
||||
layout: 'horizontal',
|
||||
schema: useFormSchema(),
|
||||
|
||||
Reference in New Issue
Block a user