feat: 完善流程详情模块,进度 20%

This commit is contained in:
ziye
2025-05-07 23:57:41 +08:00
parent 14dbff7304
commit ae2cb4ae0c
13 changed files with 196 additions and 8 deletions

View File

@@ -0,0 +1,15 @@
import { defineAsyncComponent } from 'vue';
const modules = import.meta.glob('../views/**/*.{vue,tsx}');
/**
* 注册一个异步组件
* @param componentPath 例:/bpm/oa/leave/detail
*/
export const registerComponent = (componentPath: string) => {
for (const item in modules) {
if (item.includes(componentPath)) {
// 使用异步组件的方式来动态加载组件
return defineAsyncComponent(modules[item] as any);
}
}
};