We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我的项目是从后端传router的key去和前端路由表中asyncRoutes的name做匹配,最后过滤生成新路由表, 所以我修改了store中的generateRoutes方法 使用deepClone(asyncRoutes)
但是不知为何导致生成的路由每次点击侧边栏,Layout组件都会重新渲染一次 而当我执行logout退出登录,再重新登录后,Layout组件却可以只渲染一次了,令人十分不解
The text was updated successfully, but these errors were encountered:
我暂时想到的是使用了deepClone导致Layout原本是共同的父组件变成了不同的组件 但是为什么退出后重新登录一下这个问题就解决了 明明重新登录也使用了deepClone重置路由
Sorry, something went wrong.
解决了,我在genRoutes方法所在的文件里重新引入了一下Layout 然后手动给每个路由赋值了一下同一个Layout
No branches or pull requests
我的项目是从后端传router的key去和前端路由表中asyncRoutes的name做匹配,最后过滤生成新路由表,
所以我修改了store中的generateRoutes方法 使用deepClone(asyncRoutes)
但是不知为何导致生成的路由每次点击侧边栏,Layout组件都会重新渲染一次
而当我执行logout退出登录,再重新登录后,Layout组件却可以只渲染一次了,令人十分不解
The text was updated successfully, but these errors were encountered: