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