Commit d86e54ec by 高源

11月15日dll版本

parent b1a95b3d
...@@ -226,27 +226,28 @@ function generateRoutes(data: any[]) { ...@@ -226,27 +226,28 @@ function generateRoutes(data: any[]) {
}; };
if (item.children && item.children.length > 0) { if (item.children && item.children.length > 0) {
route.children = item.children.map(child => { route.children = item.children.map(
const sanitizedRemark = (child: { Remark: string; Type: string; Kvid: any; DisplayName: any; Icon: any; SortId: any }) => {
child.Remark && child.Remark.startsWith('/') ? child.Remark.replace(/^\//, '') : child.Remark; const sanitizedRemark =
return { child.Remark && child.Remark.startsWith('/') ? child.Remark.replace(/^\//, '') : child.Remark;
name: child.Type === 'System' ? `${item.Type}_${sanitizedRemark}` : `${item.Kvid}_${child.Kvid}`, return {
path: child.Type === 'System' ? `/${item.Type}/${sanitizedRemark}` : `/${item.Kvid}/${child.Kvid}`, name: child.Type === 'System' ? `${item.Type}_${sanitizedRemark}` : `${item.Kvid}_${child.Kvid}`,
component: 'view.iframe-page', path: child.Type === 'System' ? `/${item.Type}/${sanitizedRemark}` : `/${item.Kvid}/${child.Kvid}`,
props: { component: 'view.iframe-page',
url: child.Type === 'System' ? sanitizedRemark : '', props: {
kvid: child.Kvid, url: child.Type === 'System' ? sanitizedRemark : '',
type: child.Type kvid: child.Kvid,
}, type: child.Type
meta: { },
title: child.DisplayName, meta: {
icon: child.Icon, title: child.DisplayName,
order: child.SortId, icon: child.Icon,
keepAlive: true, order: child.SortId,
type: 'iframe' keepAlive: true,
} type: 'iframe'
}; }
}); };
});
} }
return route; return route;
......
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