解决找不到审批视图组件的问题
This commit is contained in:
parent
6d759b55a3
commit
a6fd75bfd3
@ -88,7 +88,8 @@ export async function loadDynamicComponent(
|
||||
formPath: string,
|
||||
{ delay = 2000, timeout = 3000 } = {}
|
||||
) {
|
||||
const suffix = `${humpToLine(formPath)}.vue`;
|
||||
//const suffix = `${humpToLine(formPath)}index.vue`;
|
||||
const suffix = `${humpToLine(formPath)}`;
|
||||
const componentPath = suffix.replace('/workflow', '/workflow/form');
|
||||
const matched = Object.entries(modules).find(([path]) => path.endsWith(componentPath));
|
||||
|
||||
|
||||
@ -45,8 +45,12 @@ const title = computed(() => {
|
||||
const formPaths = ref<SelectOption[]>([]);
|
||||
const modules = import.meta.glob('@/components/workflow/form/**/*.vue');
|
||||
Object.keys(modules).forEach(key => {
|
||||
const label = key.replace('/src/components/workflow/form/', '');
|
||||
const value = key.replace('/src/components/workflow/form', '/workflow');
|
||||
//const label = key.replace('/src/components/workflow/form/', '');
|
||||
//const value = key.replace('/src/components/workflow/form', '/workflow');
|
||||
|
||||
const label = key.replace('/src/components/workflow/form/', '').replace('/index.vue', '');
|
||||
//const value = key.replace('/src/components/workflow/form', '/workflow').replace('index.vue', '');
|
||||
|
||||
formPaths.value.push({ label, value });
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user