Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Oct 20, 2022
1 parent 088f5f8 commit 3614853
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/transformRoute/transformRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ function formatter(
if (!item) return false;
if (notNullArray(item.children)) return true;
if (item.path) return true;
if (item.originPath) return true;
if (item.layout) return true;
// 重定向
if (item.redirect) return false;
Expand All @@ -182,7 +183,10 @@ function formatter(
return true;
})
.map((finallyItem) => {
const item = { ...finallyItem };
const item = {
...finallyItem,
path: finallyItem.path || finallyItem.originPath,
} as MenuDataItem;
if (!item.children && item[childrenPropsName]) {
item.children = item[childrenPropsName];
delete item[childrenPropsName];
Expand Down

0 comments on commit 3614853

Please sign in to comment.