-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
点开菜单组里面的隐藏菜单的时候 页面刷新了, 菜单组也没有高亮 #2268
Comments
Translation of this issue: When the hidden menu in the menu group is clicked, the page is refreshed and the menu group is not highlighted.Question 1 The page should not be refreshed.
|
隐藏了怎么点击? |
菜单隐藏 是不需要在主菜单展示, 在数据列表上 可以点击 详情 进入 |
需要自己实现逻辑了 |
你好,解决了吗?碰到了相同的问题,期待回复~ |
我是这样解决的 export const layout = ({
initialState,
}: {
initialState: { settings?: LayoutSettings };
}): BasicLayoutProps => {
return {
subMenuItemRender: (_, dom) => {
const style = location.pathname.includes(_.path) ? {color: '#1890ff'} : {}
return (
<div
style={style}
onClick={() => {
if (_.children.length) {
history.push(_.children[0].path);
}
}}
>
{dom}
</div>
);
},
...initialState?.settings,
};
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题1 页面不应该刷新的吧
问题2 菜单组应该高亮的吧
The text was updated successfully, but these errors were encountered: