chore: 样式

This commit is contained in:
dap 2024-09-12 21:56:21 +08:00
parent bd1cc2629f
commit e67a78e971
2 changed files with 7 additions and 1 deletions

View File

@ -22,6 +22,9 @@ const title = computed(() => {
}); });
const [BasicForm, formApi] = useVbenForm({ const [BasicForm, formApi] = useVbenForm({
commonConfig: {
labelWidth: 80,
},
schema: modalSchema(), schema: modalSchema(),
showDefaultActions: false, showDefaultActions: false,
}); });
@ -34,6 +37,7 @@ const [BasicModal, modalApi] = useVbenModal({
if (!isOpen) { if (!isOpen) {
return null; return null;
} }
modalApi.modalLoading(true);
const { record, update } = modalApi.getData() as ModalProps; const { record, update } = modalApi.getData() as ModalProps;
isUpdate.value = update; isUpdate.value = update;
if (update && record) { if (update && record) {
@ -41,6 +45,7 @@ const [BasicModal, modalApi] = useVbenModal({
await formApi.setFieldValue(key, record[key]); await formApi.setFieldValue(key, record[key]);
} }
} }
modalApi.modalLoading(false);
}, },
}); });
@ -70,7 +75,7 @@ async function handleCancel() {
</script> </script>
<template> <template>
<BasicModal :title="title" class="w-[600px]"> <BasicModal :title="title" class="w-[550px]">
<BasicForm /> <BasicForm />
</BasicModal> </BasicModal>
</template> </template>

View File

@ -59,6 +59,7 @@ export const modalSchema: FormSchemaGetter = () => [
placeholder: '请输入', placeholder: '请输入',
}, },
fieldName: 'remark', fieldName: 'remark',
formItemClass: 'items-baseline',
label: '备注', label: '备注',
}, },
]; ];