浏览代码

fix: 调整dashboard路由结构,父级隐藏子级显示,彻底消除重复菜单

pure-admin对单子路由自动折叠父级显示子级,改为父级showLink:false + 子级承载全部meta信息

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline 2 周之前
父节点
当前提交
2fa0582ab2
共有 1 个文件被更改,包括 4 次插入6 次删除
  1. 4 6
      haha-admin-web/src/router/modules/dashboard.ts

+ 4 - 6
haha-admin-web/src/router/modules/dashboard.ts

@@ -2,10 +2,7 @@ export default {
   path: "/dashboard",
   redirect: "/dashboard/index",
   meta: {
-    icon: "ri:dashboard-line",
-    title: "数据概览",
-    rank: 1,
-    roles: ["admin", "operator", "viewer"]
+    showLink: false
   },
   children: [
     {
@@ -13,9 +10,10 @@ export default {
       name: "Dashboard",
       component: () => import("@/views/dashboard/index.vue"),
       meta: {
-        icon: "ri:bar-chart-box-line",
+        icon: "ri:dashboard-line",
         title: "数据概览",
-        showLink: false
+        rank: 1,
+        roles: ["admin", "operator", "viewer"]
       }
     }
   ]