From 7511fcbd5154b9a1b2f4faf276fc0f1948a0c849 Mon Sep 17 00:00:00 2001 From: xlsea Date: Tue, 13 May 2025 22:45:59 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E8=BD=AC=E6=8D=A2=E9=83=A8=E5=88=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 2 +- src/store/modules/route/index.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.env.dev b/.env.dev index 0daad891..4e18fee1 100644 --- a/.env.dev +++ b/.env.dev @@ -1,5 +1,5 @@ # backend service base url, test environment -VITE_SERVICE_BASE_URL=http://127.0.0.1:8080 +VITE_SERVICE_BASE_URL=https://ruoyi.xlsea.cn/prod-api VITE_APP_BASE_API=/dev-api diff --git a/src/store/modules/route/index.ts b/src/store/modules/route/index.ts index 84dfac09..a5dbdc9b 100644 --- a/src/store/modules/route/index.ts +++ b/src/store/modules/route/index.ts @@ -91,16 +91,16 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => { function parseRouter(route: ElegantConstRoute, parent?: ElegantConstRoute) { if (authRouteMode.value === 'dynamic') { - if (route.component === 'Layout' && route.path === '/' && route.children?.length) { - Object.assign(route, route.children[0]); - } // @ts-expect-error no query field const query = route.query ? String(route.query) : undefined; route.path = route.path.startsWith('//') ? route.path.substring(1) : route.path; route.path = parent ? parent.path + route.path : route.path; - const name = humpToLine(route.path.substring(1).replace('/', '_')); + // route.name = route.component!; + // if (['layout.base', 'iframe-page'].includes(route.component!)) { + const name = humpToLine(route.path.substring(1).replace('/', '_')); route.name = parent ? `${parent.name}_${name}` : name; + // } route.meta = route.meta ? route.meta : { title: route.name };