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

[Bug]q子应用点击返回时出现http://localhost:8080/app-vueundefined #2943

Open
baixiaomei opened this issue Apr 11, 2024 · 4 comments

Comments

@baixiaomei
Copy link

提问之前强烈建立您能先阅读一下《如何正确的提出一个 Issue》

What happens?

子应用:qiankun+vue3 + router4.0.3
主应用:vue2.0+ router3.0

菜单是主应用的部分 点击菜单通过router-view 的to属性跳转到子应用,点击详情再跳转到子应用的详情页面(push),点击返回,再切换其它菜单,跳转其它页面 点击详情(push)再点击返回就会跳转到http://localhost:8080/app-vueundefined页面

最小可复现仓库

为节约大家的时间,无复现步骤的 ISSUE 会被关闭,提供之后再 REOPEN

复现步骤,错误日志以及相关配置

相关环境信息

  • qiankun 版本 2.7.0
  • 浏览器版本
  • 操作系统
@L0st1
Copy link

L0st1 commented Apr 16, 2024

官方文档

@gaomigithub
Copy link

这个问题我也遇到过,变成了url后面加个undefined的情况,这样就找不到路由了,这问题也不好形容不知道咋问咋解决

@Alone-2
Copy link

Alone-2 commented Sep 5, 2024

这个问题我也遇到过,变成了url后面加个undefined的情况,这样就找不到路由了,这问题也不好形容不知道咋问咋解决

后面有解决吗,我也出现了这个问题

@Alone-2
Copy link

Alone-2 commented Sep 9, 2024

目前暂时的解决方法是手动往 history.state里加current
例如主应用点击菜单跳/app1/aa

history.pushState({
  current: "/aa"
},
"",
"/app1/aa"
)

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

4 participants