-
Notifications
You must be signed in to change notification settings - Fork 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
[Bug] 父应用无法感知子应用路由切换 #339
Labels
Comments
This was referenced Mar 26, 2020
本身就是隔离的,主子应用 router 实例都不一样,自然不能互相监听 |
大佬见多识广,看看这个场景如何处理,或者你们的业务实践怎么处理 后台管理系统,菜单栏是后端获取,用户每次进入菜单,都要和vuex中menu列表对比,防止直接通过手输入url进入没有权限的页面 那这个校检我觉得是放到主应用比较合适,但由于没法感知子应用路由跳转导致有问题 |
不知道大佬理解了没有 |
放到子应用比较合适 |
你是指嵌套的子应用,还是多匹配的子应用,还是指每个子应用都做这套逻辑 还有为什么子应用合适,这种全局的问题,不应该是放在父应用比较合适吗 |
架构上来讲这个属于子应用自己的职责范畴。
|
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#225 What happens?
主和子应用都是vue项目时,父应用的路由守卫,仅在初次渲染的时候触发,子应用内跳转无法触发
因为我们将权限等功能放到了父应用中,所以需要感知子应用路由的变化
最小可复现仓库
https://github.com/dream2023/qiankun_bug
复现步骤,错误日志以及相关配置
从上图看到,主应用设置了路由后置守卫
除了初始化有一个 log信息外,当切换子应用路由时,并无信息输出
相关环境信息
The text was updated successfully, but these errors were encountered: