mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-12 15:52:57 +00:00
fix: update menus
This commit is contained in:
parent
55a78fdca9
commit
4566394abf
@ -22,7 +22,7 @@ export const routesAlarm: Array<RouteRecordRaw> = [
|
||||
path: "",
|
||||
name: "Alarm",
|
||||
meta: {
|
||||
title: "alarm",
|
||||
title: "Alerting",
|
||||
icon: "spam",
|
||||
hasGroup: false,
|
||||
},
|
||||
|
@ -23,7 +23,7 @@ export const routesDashboard: Array<RouteRecordRaw> = [
|
||||
component: Layout,
|
||||
name: "Dashboard",
|
||||
meta: {
|
||||
title: "dashboards",
|
||||
title: "Dashboards",
|
||||
icon: "dashboard_customize",
|
||||
hasGroup: true,
|
||||
},
|
||||
@ -33,7 +33,7 @@ export const routesDashboard: Array<RouteRecordRaw> = [
|
||||
component: () => import("@/views/dashboard/List.vue"),
|
||||
name: "List",
|
||||
meta: {
|
||||
title: "dashboardList",
|
||||
title: "Dashboard List",
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -41,7 +41,7 @@ export const routesDashboard: Array<RouteRecordRaw> = [
|
||||
component: () => import("@/views/dashboard/New.vue"),
|
||||
name: "New",
|
||||
meta: {
|
||||
title: "dashboardNew",
|
||||
title: "New Dashboard",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -22,7 +22,7 @@ export const routesMarketplace: Array<RouteRecordRaw> = [
|
||||
path: "",
|
||||
name: "Marketplace",
|
||||
meta: {
|
||||
title: "marketplace",
|
||||
title: "Marketplace",
|
||||
icon: "settings",
|
||||
hasGroup: true,
|
||||
},
|
||||
@ -32,7 +32,7 @@ export const routesMarketplace: Array<RouteRecordRaw> = [
|
||||
path: "/marketplace/menus",
|
||||
name: "MenusManagement",
|
||||
meta: {
|
||||
title: "menus",
|
||||
title: "Menus",
|
||||
},
|
||||
component: () => import("@/views/marketplace/Menus.vue"),
|
||||
},
|
||||
@ -40,7 +40,7 @@ export const routesMarketplace: Array<RouteRecordRaw> = [
|
||||
path: "/marketplace/settings",
|
||||
name: "Settings",
|
||||
meta: {
|
||||
title: "settings",
|
||||
title: "Settings",
|
||||
},
|
||||
component: () => import("@/views/marketplace/Settings.vue"),
|
||||
},
|
||||
|
@ -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 });
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user