From 7553882354a7bc4a19d23b8b9b5fde1e06b79d90 Mon Sep 17 00:00:00 2001 From: lijun Date: Thu, 21 Nov 2024 23:41:54 +0800 Subject: [PATCH 1/2] update code --- index.html | 2 +- src/api/menu/index.ts | 30 ++++++++++++++++++- .../NavBar/components/NavbarRight2.vue | 25 ++++++++++------ 3 files changed, 46 insertions(+), 11 deletions(-) diff --git a/index.html b/index.html index dce4f3e..87e3983 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - --> +-->
diff --git a/src/api/menu/index.ts b/src/api/menu/index.ts index 1088326..5427495 100644 --- a/src/api/menu/index.ts +++ b/src/api/menu/index.ts @@ -7,7 +7,35 @@ class MenuAPI { */ static getRoutes() { return new Promise((resolve) => { - resolve([ + resolve([ + { + path: "/home", + component: "Layout", + redirect: "/home/index2", + name: "/index2", + meta: { + title: "数据总览2", + icon: "homepage", + hidden: false, + roles: ["GUEST", "ADMIN", "ADMIN6","data_admin"], + alwaysShow: false, + }, + children: [ + { + path: "index2", + component: "dashboard/index2", + name: "dashboardIndex2", + meta: { + title: "模型管理", + icon: "user", + hidden: true, + roles: ["ADMIN", "GUEST","data_admin"], + keepAlive: true, + alwaysShow: false, + }, + }, + ], + }, { path: "/modelMgr", component: "Layout", diff --git a/src/layout/components/NavBar/components/NavbarRight2.vue b/src/layout/components/NavBar/components/NavbarRight2.vue index 606e558..a335527 100644 --- a/src/layout/components/NavBar/components/NavbarRight2.vue +++ b/src/layout/components/NavBar/components/NavbarRight2.vue @@ -1,10 +1,15 @@