diff --git a/src/router/alarm.ts b/src/router/alarm.ts index 24101dd4..f9e6b92f 100644 --- a/src/router/alarm.ts +++ b/src/router/alarm.ts @@ -22,7 +22,7 @@ export const routesAlarm: Array = [ path: "", name: "Alarm", meta: { - title: "alarm", + title: "Alerting", icon: "spam", hasGroup: false, }, diff --git a/src/router/dashboard.ts b/src/router/dashboard.ts index 32be6261..ab7ade75 100644 --- a/src/router/dashboard.ts +++ b/src/router/dashboard.ts @@ -23,7 +23,7 @@ export const routesDashboard: Array = [ component: Layout, name: "Dashboard", meta: { - title: "dashboards", + title: "Dashboards", icon: "dashboard_customize", hasGroup: true, }, @@ -33,7 +33,7 @@ export const routesDashboard: Array = [ component: () => import("@/views/dashboard/List.vue"), name: "List", meta: { - title: "dashboardList", + title: "Dashboard List", }, }, { @@ -41,7 +41,7 @@ export const routesDashboard: Array = [ component: () => import("@/views/dashboard/New.vue"), name: "New", meta: { - title: "dashboardNew", + title: "New Dashboard", }, }, { diff --git a/src/router/layer.ts b/src/router/layer.ts index 69ccd76f..bc39e20d 100644 --- a/src/router/layer.ts +++ b/src/router/layer.ts @@ -55,6 +55,19 @@ async function layerDashboards() { tab.component = () => import("@/views/Layer.vue"); route.children.push(tab); } + if (!item.subItems.length) { + route.children = [ + { + name: item.name, + path: item.path, + title: item.title, + layer: item.layer, + activate: item.activate, + icon: item.icon, + id: item.id, + }, + ]; + } return route; }); return routes; diff --git a/src/router/marketplace.ts b/src/router/marketplace.ts index 95b0086d..0fb8cc3f 100644 --- a/src/router/marketplace.ts +++ b/src/router/marketplace.ts @@ -22,7 +22,7 @@ export const routesMarketplace: Array = [ path: "", name: "Marketplace", meta: { - title: "marketplace", + title: "Marketplace", icon: "settings", hasGroup: true, }, @@ -32,7 +32,7 @@ export const routesMarketplace: Array = [ path: "/marketplace/menus", name: "MenusManagement", meta: { - title: "menus", + title: "Menus", }, component: () => import("@/views/marketplace/Menus.vue"), }, @@ -40,7 +40,7 @@ export const routesMarketplace: Array = [ path: "/marketplace/settings", name: "Settings", meta: { - title: "settings", + title: "Settings", }, component: () => import("@/views/marketplace/Settings.vue"), }, diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index af48554a..a22298dd 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -187,18 +187,6 @@ export const appStore = defineStore({ item.id = item.name; return item; }); - } else { - d.subItems = [ - { - name: d.name, - path: d.path, - title: d.title, - layer: d.layer, - activate: d.activate, - icon: d.icon, - id: d.id, - }, - ]; } return d; @@ -236,7 +224,10 @@ export const appStore = defineStore({ subItems.push(item); } } - if (subItems.length && d.activate) { + if (d.hasGroup && subItems.length) { + current.push({ ...d, subItems }); + } + if (!d.hasGroup && d.activate) { current.push({ ...d, subItems }); } }