refactor: 调整命名

This commit is contained in:
dap
2025-08-08 10:10:51 +08:00
parent c401a3092f
commit 6ef3586811
2 changed files with 5 additions and 5 deletions

View File

@@ -3,7 +3,7 @@
动态渲染要显示的内容 需要再flowDescripionsMap先定义好组件
-->
<script setup lang="ts">
import type { DescripionsMapKey } from '../register';
import type { FlowComponentsMapMapKey } from '../register';
import type { FlowInfoResponse } from '#/api/workflow/instance/model';
import type { TaskInfo } from '#/api/workflow/task/model';
@@ -11,7 +11,7 @@ import type { TaskInfo } from '#/api/workflow/task/model';
import { Divider } from 'ant-design-vue';
import { ApprovalTimeline } from '.';
import { flowDescripionsMap } from '../register';
import { flowComponentsMap } from '../register';
defineOptions({
name: 'ApprovalDetails',
@@ -33,7 +33,7 @@ defineProps<{
business-id为业务ID 必传
-->
<component
:is="flowDescripionsMap[task.formPath as DescripionsMapKey]"
:is="flowComponentsMap[task.formPath as FlowComponentsMapMapKey]"
:business-id="task.businessId"
/>
<Divider />

View File

@@ -11,11 +11,11 @@ const LeaveDescription = defineAsyncComponent(
/**
* key为流程的路径(task.formPath) value为要显示的组件
*/
export const flowDescripionsMap = {
export const flowComponentsMap = {
/**
* 请假申请 详情
*/
'/workflow/leaveEdit/index': markRaw(LeaveDescription),
};
export type DescripionsMapKey = keyof typeof flowDescripionsMap;
export type FlowComponentsMapMapKey = keyof typeof flowComponentsMap;