Skip to content

Commit

Permalink
fix: menuItem should support target (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadyZOZ committed Mar 19, 2021
1 parent ea086ee commit ec0f461
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/plugin-layout/src/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ const BasicLayout = (props: any) => {
return defaultDom;
}
if (menuItemProps.path && location.pathname !== menuItemProps.path) {
return <Link to={menuItemProps.path}>{defaultDom}</Link>;
return (
<Link to={menuItemProps.path} target={menuItemProps.target}>
{defaultDom}
</Link>
);
}
return defaultDom;
}}
Expand Down

0 comments on commit ec0f461

Please sign in to comment.