Преглед на файлове

系统管理默认选中

liuQiang преди 1 година
родител
ревизия
acd2fe0758
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      src/layout/indexCommon.vue

+ 5 - 1
src/layout/indexCommon.vue

@@ -503,11 +503,15 @@ if (hasRole) {
   const thisItem = sidebarRouters.value.find(item=>item.redirect == "noRedirect") //拿到系统管理的第一个菜单 判断依据:第一个redirect == "noRedirect"的路由
   const path1 = thisItem.path //一级路由
   const path2 = thisItem.children[0].path //二级路由
+  let path3
+  if(thisItem.children[0].children){
+    path3 = thisItem.children[0].children[0].path
+  }
   menuList.data.push(
     {
       label: "系统管理",
       // path: "/biz/dirTemplate",
-      path: `${path1}/${path2}`,
+      path: `${path1}/${path2}${path3?'/'+path3:''}`,
       imgs: system,
       beimgs: issystem,
     }