瀏覽代碼

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

yihua 2 年之前
父節點
當前提交
6c06bd61f2
共有 1 個文件被更改,包括 1 次插入0 次删除
  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;