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

主应用跳转子应用的页面,子应用内部使用router.push,出现以下警告 #1242

Open
yunguang opened this issue Jun 4, 2024 · 1 comment
Labels

Comments

@yunguang
Copy link

yunguang commented Jun 4, 2024

问题描述

问题的具体描述
子应用内部使用router.push告警如下:
[Vue Router warn]: history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:

history.replaceState(history.state, '', url)

You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.

复现步骤

  1. 主应用
    microApp.router.push({ name: appName.value, path: '/#' + path })
  2. 子应用
    router.push({path: ‘xxx’ })

上传截图

请上传代码截图、控制台、终端等截图以帮助我们了解您的问题。

复现仓库

请提供一个精简的代码仓库,然后上传到自己的 github,以帮助我们复现您的问题。

环境信息

  • micro-app版本:1.0.0-rc.5
  • 主应用前端框架&版本:"vue": "^3.3.11", "vue-router": "^4.2.5",
  • 子应用前端框架&版本:"vue": "^3.3.11", "vue-router": "^4.2.5"
  • 构建工具&版本:"vite": "^5.0.10"
@bailicangdu
Copy link
Member

跳转方式不同引起的,可以忽略

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

No branches or pull requests

2 participants