提交 ac164544 编写于 作者: C chenshuai2144

bugfix: fix var error

上级 d2abf996
......@@ -133,7 +133,11 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
onCollapse={handleMenuCollapse}
onMenuHeaderClick={() => history.push('/')}
menuItemRender={(menuItemProps, defaultDom) => {
if (menuItemProps.isUrl || !menuItemProps.path || pathname === menuItemProps.path) {
if (
menuItemProps.isUrl ||
!menuItemProps.path ||
location.pathname === menuItemProps.path
) {
return defaultDom;
}
return <Link to={menuItemProps.path}>{defaultDom}</Link>;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册