mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 00:08:56 +00:00
fix: update menus
This commit is contained in:
parent
55a78fdca9
commit
4566394abf
@ -22,7 +22,7 @@ export const routesAlarm: Array<RouteRecordRaw> = [
|
|||||||
path: "",
|
path: "",
|
||||||
name: "Alarm",
|
name: "Alarm",
|
||||||
meta: {
|
meta: {
|
||||||
title: "alarm",
|
title: "Alerting",
|
||||||
icon: "spam",
|
icon: "spam",
|
||||||
hasGroup: false,
|
hasGroup: false,
|
||||||
},
|
},
|
||||||
|
@ -23,7 +23,7 @@ export const routesDashboard: Array<RouteRecordRaw> = [
|
|||||||
component: Layout,
|
component: Layout,
|
||||||
name: "Dashboard",
|
name: "Dashboard",
|
||||||
meta: {
|
meta: {
|
||||||
title: "dashboards",
|
title: "Dashboards",
|
||||||
icon: "dashboard_customize",
|
icon: "dashboard_customize",
|
||||||
hasGroup: true,
|
hasGroup: true,
|
||||||
},
|
},
|
||||||
@ -33,7 +33,7 @@ export const routesDashboard: Array<RouteRecordRaw> = [
|
|||||||
component: () => import("@/views/dashboard/List.vue"),
|
component: () => import("@/views/dashboard/List.vue"),
|
||||||
name: "List",
|
name: "List",
|
||||||
meta: {
|
meta: {
|
||||||
title: "dashboardList",
|
title: "Dashboard List",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -41,7 +41,7 @@ export const routesDashboard: Array<RouteRecordRaw> = [
|
|||||||
component: () => import("@/views/dashboard/New.vue"),
|
component: () => import("@/views/dashboard/New.vue"),
|
||||||
name: "New",
|
name: "New",
|
||||||
meta: {
|
meta: {
|
||||||
title: "dashboardNew",
|
title: "New Dashboard",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -55,6 +55,19 @@ async function layerDashboards() {
|
|||||||
tab.component = () => import("@/views/Layer.vue");
|
tab.component = () => import("@/views/Layer.vue");
|
||||||
route.children.push(tab);
|
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 route;
|
||||||
});
|
});
|
||||||
return routes;
|
return routes;
|
||||||
|
@ -22,7 +22,7 @@ export const routesMarketplace: Array<RouteRecordRaw> = [
|
|||||||
path: "",
|
path: "",
|
||||||
name: "Marketplace",
|
name: "Marketplace",
|
||||||
meta: {
|
meta: {
|
||||||
title: "marketplace",
|
title: "Marketplace",
|
||||||
icon: "settings",
|
icon: "settings",
|
||||||
hasGroup: true,
|
hasGroup: true,
|
||||||
},
|
},
|
||||||
@ -32,7 +32,7 @@ export const routesMarketplace: Array<RouteRecordRaw> = [
|
|||||||
path: "/marketplace/menus",
|
path: "/marketplace/menus",
|
||||||
name: "MenusManagement",
|
name: "MenusManagement",
|
||||||
meta: {
|
meta: {
|
||||||
title: "menus",
|
title: "Menus",
|
||||||
},
|
},
|
||||||
component: () => import("@/views/marketplace/Menus.vue"),
|
component: () => import("@/views/marketplace/Menus.vue"),
|
||||||
},
|
},
|
||||||
@ -40,7 +40,7 @@ export const routesMarketplace: Array<RouteRecordRaw> = [
|
|||||||
path: "/marketplace/settings",
|
path: "/marketplace/settings",
|
||||||
name: "Settings",
|
name: "Settings",
|
||||||
meta: {
|
meta: {
|
||||||
title: "settings",
|
title: "Settings",
|
||||||
},
|
},
|
||||||
component: () => import("@/views/marketplace/Settings.vue"),
|
component: () => import("@/views/marketplace/Settings.vue"),
|
||||||
},
|
},
|
||||||
|
@ -187,18 +187,6 @@ export const appStore = defineStore({
|
|||||||
item.id = item.name;
|
item.id = item.name;
|
||||||
return item;
|
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;
|
return d;
|
||||||
@ -236,7 +224,10 @@ export const appStore = defineStore({
|
|||||||
subItems.push(item);
|
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 });
|
current.push({ ...d, subItems });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user