Commit a81dc406 authored by 邓晓峰's avatar 邓晓峰

fix: 修复重复菜单BUG

parent 4165988a
Pipeline #43082 passed with stages
in 1 minute 39 seconds
...@@ -112,7 +112,7 @@ const generRotes = (widgets, parent, level = 0) => { ...@@ -112,7 +112,7 @@ const generRotes = (widgets, parent, level = 0) => {
) || ''; ) || '';
const l = level ? level + 1 : -1; const l = level ? level + 1 : -1;
const common = { let common = {
name: item.label, name: item.label,
level: l, level: l,
component: 'BasicLayout', component: 'BasicLayout',
...@@ -131,8 +131,8 @@ const generRotes = (widgets, parent, level = 0) => { ...@@ -131,8 +131,8 @@ const generRotes = (widgets, parent, level = 0) => {
}; };
if(/iframe/.test(url)) { if(/iframe/.test(url)) {
url = url.replace(/\/report/, ''); url = url.replace(/\/report/, '');
console.log("url", url);
ret.push({ common = {
name: item.label, name: item.label,
level: l, level: l,
component: dynamic({ loader: () => component: dynamic({ loader: () =>
...@@ -150,8 +150,8 @@ const generRotes = (widgets, parent, level = 0) => { ...@@ -150,8 +150,8 @@ const generRotes = (widgets, parent, level = 0) => {
}, },
params: getParams(url), params: getParams(url),
parent, parent,
}) }
} }
ret.push(common); ret.push(common);
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment