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

qiankun 子应用跳转后/ 根路径会发生改变变成/a/,请问这个问题如何解决,有怀疑过loadMicroApp手动加载应用,unmount后没有销毁它的内存占用 #3004

Open
sierCong opened this issue Aug 29, 2024 · 3 comments

Comments

@sierCong
Copy link

"qiankun": "^2.7.2",
node: 14.16.1
主应用和子应用均采用vue3

背景:主应用已经接入过其他子应用跳转均正常,新增子应用接入后导致页面跳转url混乱,子应用的接入均采用手动加载的方法进行注册

子应用相关伪代码如下:
main.js
main
router.js
router
vue-config.js
config
主应用注册:
image

现在的问题是 :
从菜单栏首次访问子应用时(路径:http://localhost:3000/company/media/gsetting)可以正常展示,离开当前子应用跳转到其他应用时路径就错乱了,正确的路径是http://localhost:3000/manage/com/hello, 但是跳转的路径却是http://localhost:3000/company/manage/com/hello, 导致页面加载失败。查看了相关官网资料,也没有搜索到,希望大神们可以帮忙指点一下

@sierCong
Copy link
Author

更正一下,主应用是react、子应用是vue3

@liujiayii
Copy link

应该是一个问题吧,我是自己实现了个useRouter来跳页面,,vue-router的仓库也有相关的issues #1865 (comment)

@sierCong
Copy link
Author

sierCong commented Sep 2, 2024

应该还是vue-router版本的问题,目前就是把vue-router的版本降下来了

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