refactor: 调整命名

master
dap 5 months ago
parent c401a3092f
commit 6ef3586811

@ -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 />

@ -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;

Loading…
Cancel
Save