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

@@ -14,12 +14,17 @@ import { useFormSchema } from '../data';
const emit = defineEmits(['success']);
const [Form, formApi] = useVbenForm({
commonConfig: {
componentProps: {
class: 'w-full',
},
formItemClass: 'col-span-2',
labelWidth: 80,
hideLabel: true,
},
layout: 'horizontal',
schema: useFormSchema().map((item) => ({ ...item, label: '' })), // 去除label
showDefaultActions: false,
commonConfig: {
hideLabel: true,
},
});
const [Modal, modalApi] = useVbenModal({