Bläddra i källkod

fix:修复后端控制路由获取菜单树时path属性返回空值导致前端添加路由报错

yihua 2 år sedan
förälder
incheckning
6c06bd61f2
1 ändrade filer med 1 tillägg och 0 borttagningar
  1. 1 0
      Web/src/router/backEnd.ts

+ 1 - 0
Web/src/router/backEnd.ts

@@ -136,6 +136,7 @@ export async function setBackEndControlRefreshRoutes() {
 export function backEndComponent(routes: any) {
 	if (!routes) return;
 	return routes.map((item: any) => {
+		if (item.path) item.path = "";
 		if (item.component) item.component = dynamicImport(dynamicViewsModules, item.component as string);
 		item.children && backEndComponent(item.children);
 		return item;