fix: type error

This commit is contained in:
xingyu4j
2025-06-24 14:10:47 +08:00
parent f758097ac9
commit 9a3a9eec09

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>