refactor: 调整命名

master
dap 5 months ago
parent c401a3092f
commit 6ef3586811

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

@ -11,11 +11,11 @@ const LeaveDescription = defineAsyncComponent(
/** /**
* key(task.formPath) value * key(task.formPath) value
*/ */
export const flowDescripionsMap = { export const flowComponentsMap = {
/** /**
* *
*/ */
'/workflow/leaveEdit/index': markRaw(LeaveDescription), '/workflow/leaveEdit/index': markRaw(LeaveDescription),
}; };
export type DescripionsMapKey = keyof typeof flowDescripionsMap; export type FlowComponentsMapMapKey = keyof typeof flowComponentsMap;

Loading…
Cancel
Save