fix: 解决渲染forrn.vue的问题

This commit is contained in:
valarchie 2023-08-25 08:33:24 +08:00
parent 695c012305
commit fb7ca82260

View File

@ -307,7 +307,8 @@ function addAsyncRoutes(arrRoutes: Array<RouteRecordRaw>) {
v.name = (v.children[0].name as string) + "Parent"; v.name = (v.children[0].name as string) + "Parent";
if (v.meta?.frameSrc) { if (v.meta?.frameSrc) {
v.component = IFrame; v.component = IFrame;
} else { } else if (!v.children) {
// 避免渲染form.vue组件
// 对后端传component组件路径和不传做兼容如果后端传component组件路径那么path可以随便写如果不传component组件路径会跟path保持一致 // 对后端传component组件路径和不传做兼容如果后端传component组件路径那么path可以随便写如果不传component组件路径会跟path保持一致
const index = v?.component const index = v?.component
? modulesRoutesKeys.findIndex(ev => ev.includes(v.component as any)) ? modulesRoutesKeys.findIndex(ev => ev.includes(v.component as any))