fix: type error

pull/155/head
xingyu4j 2025-06-24 14:10:47 +08:00
parent f758097ac9
commit 9a3a9eec09
1 changed files with 10 additions and 14 deletions

View File

@ -21,7 +21,7 @@ const props = defineProps<{
type: 'copy' | 'create' | 'edit'; type: 'copy' | 'create' | 'edit';
}>(); }>();
// /** 流程表单详情 */
const flowFormConfig = ref(); const flowFormConfig = ref();
const [FormModal, formModalApi] = useVbenModal({ const [FormModal, formModalApi] = useVbenModal({
@ -31,7 +31,7 @@ const [FormModal, formModalApi] = useVbenModal({
const designerRef = ref<InstanceType<typeof FcDesigner>>(); const designerRef = ref<InstanceType<typeof FcDesigner>>();
// /** 表单设计器配置 */
const designerConfig = ref({ const designerConfig = ref({
switchType: [], // , switchType: [], // ,
autoActive: true, // autoActive: true, //
@ -80,7 +80,7 @@ const currentFormId = computed(() => {
}); });
// //
async function loadFormConfig(id: number | string) { async function loadFormConfig(id: number) {
try { try {
const formDetail = await getFormDetail(id); const formDetail = await getFormDetail(id);
flowFormConfig.value = formDetail; flowFormConfig.value = formDetail;
@ -106,8 +106,7 @@ async function initializeDesigner() {
} }
} }
// TODO @ziye使 /** */ /** 保存表单 */
//
function handleSave() { function handleSave() {
formModalApi formModalApi
.setData({ .setData({
@ -118,7 +117,7 @@ function handleSave() {
.open(); .open();
} }
// /** 返回列表页 */
function onBack() { function onBack() {
router.push({ router.push({
path: '/bpm/manager/form', path: '/bpm/manager/form',
@ -137,7 +136,11 @@ onMounted(() => {
<Page auto-content-height> <Page auto-content-height>
<FormModal @success="onBack" /> <FormModal @success="onBack" />
<FcDesigner class="my-designer" ref="designerRef" :config="designerConfig"> <FcDesigner
class="h-full min-h-[500px]"
ref="designerRef"
:config="designerConfig"
>
<template #handle> <template #handle>
<Button size="small" type="primary" @click="handleSave"> <Button size="small" type="primary" @click="handleSave">
<IconifyIcon icon="mdi:content-save" /> <IconifyIcon icon="mdi:content-save" />
@ -147,10 +150,3 @@ onMounted(() => {
</FcDesigner> </FcDesigner>
</Page> </Page>
</template> </template>
<style scoped>
.my-designer {
height: 100%;
min-height: 500px;
}
</style>