mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-12 15:52:57 +00:00
fix: update
This commit is contained in:
parent
ccc8924d26
commit
6dc0a4a2a8
@ -30,7 +30,7 @@ const router = createRouter({
|
||||
|
||||
(window as any).axiosCancel = [];
|
||||
|
||||
const defaultPath = routesLayers[0].children[0].path;
|
||||
const defaultPath = (routesLayers[0] && routesLayers[0].children[0].path) || "";
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
// const token = window.localStorage.getItem("skywalking-authority");
|
||||
|
@ -25,8 +25,9 @@ async function layerDashboards() {
|
||||
path: "",
|
||||
component: Layout,
|
||||
meta: {
|
||||
icon: item.icon,
|
||||
icon: item.icon || "cloud_queue",
|
||||
title: item.title,
|
||||
hasGroup: item.hasGroup,
|
||||
},
|
||||
children: item.subItems && item.subItems.length ? [] : undefined,
|
||||
};
|
||||
@ -37,6 +38,7 @@ async function layerDashboards() {
|
||||
meta: {
|
||||
title: child.title,
|
||||
layer: child.layer,
|
||||
icon: child.icon || "cloud_queue",
|
||||
},
|
||||
};
|
||||
d.component = () => import("@/views/Layer.vue");
|
||||
|
@ -172,17 +172,18 @@ export const appStore = defineStore({
|
||||
);
|
||||
},
|
||||
async getActivateMenus() {
|
||||
// localStorage.removeItem("customMenus");
|
||||
const resp = (await this.queryMenuItems()) || {};
|
||||
const menus = (resp.getMenuItems || []).map((d: MenuOptions, index: number) => {
|
||||
const name = `${d.title.replace(/\s+/g, "-")}-${index}`;
|
||||
d.name = name;
|
||||
d.path = `/${name}`;
|
||||
const t = `${d.title.replace(/\s+/g, "-")}`;
|
||||
d.name = `${t}-${index}`;
|
||||
d.path = `/${t}`;
|
||||
if (d.subItems && d.subItems.length) {
|
||||
d.hasGroup = true;
|
||||
d.subItems = d.subItems.map((item: any, sub: number) => {
|
||||
const id = `${d.title.replace(/\s+/g, "-")}-${index}${sub}`;
|
||||
item.name = id;
|
||||
item.path = `/${id}`;
|
||||
const id = `${item.title.replace(/\s+/g, "-")}`;
|
||||
item.name = `${id}-${index}${sub}`;
|
||||
item.path = `/${t}/${id}`;
|
||||
return item;
|
||||
});
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user