diff --git a/Web/src/router/backEnd.ts b/Web/src/router/backEnd.ts index 8a5a03f4..f343b8da 100644 --- a/Web/src/router/backEnd.ts +++ b/Web/src/router/backEnd.ts @@ -116,7 +116,22 @@ export async function getBackEndControlRoutes() { // window.location.reload(); // }, 3000); // } - return res.data.result; + let resData = res.data.result; + recursive(resData); + + + return resData; +} + +function recursive(resData: any) { + if (resData && resData.length > 0) { + resData.forEach((item: any) => { + item.meta.title = item.i18nName; + if (item.children && item.children.length > 0) { + recursive(item.children); + } + }); + } } /** diff --git a/Web/src/router/route.ts b/Web/src/router/route.ts index 90e0ca54..3a4a58cc 100644 --- a/Web/src/router/route.ts +++ b/Web/src/router/route.ts @@ -115,7 +115,7 @@ export const staticRoutes: Array = [ name: 'login', component: () => import('/@/views/login/index.vue'), meta: { - title: '登录', + title: 'Login', isPublic: true, }, },