Преглед изворни кода

fix: 还原home.ts和dashboard.ts到接近原始状态,菜单问题由数据库修复

菜单实际由数据库驱动,前端路由文件的rank/showLink修改不影响菜单显示。
home.ts保留title(RouteConfigsTable要求)+rank,dashboard.ts还原原始父子结构。
真正修复:数据库执行 UPDATE t_menu SET show_link = 0 WHERE id = 101

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline пре 2 недеља
родитељ
комит
63f9c3500b

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

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

+ 2 - 1
haha-admin-web/src/router/modules/home.ts

@@ -1,3 +1,4 @@
+import { home } from "@/router/enums";
 const Layout = () => import("@/layout/index.vue");
 
 export default {
@@ -6,6 +7,6 @@ export default {
   redirect: "/dashboard/index",
   meta: {
     title: "首页",
-    showLink: false
+    rank: home
   }
 } satisfies RouteConfigsTable;