Skip to content
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

子路由点击菜单整个菜单树刷新 #686

Open
CrownHanhard opened this issue May 31, 2023 · 2 comments
Open

子路由点击菜单整个菜单树刷新 #686

CrownHanhard opened this issue May 31, 2023 · 2 comments

Comments

@CrownHanhard
Copy link

主应用和子应用都是vite 菜单为动态菜单 点击子应用的菜单会出现重新渲染菜单

@ClarkXia
Copy link
Collaborator

https://github.com/ice-lab/react-materials/blob/master/scaffolds/icestark-layout/src/layouts/FrameworkLayout/index.tsx#L12

路由变化会导致整个 FrameworkLayout 发生渲染的,如果部分菜单不希望重新渲染可以通过 useMemo 等逻辑定向优化下

@CrownHanhard
Copy link
Author

我们是Vue3的 目前发现了问题 是在start里面监听了路由改变防止路由不跳转加了一个router push 把这段注释掉就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants