You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
浏览器回退时报错:Uncaught Error: application 'app1' died in status SKIP_BECAUSE_BROKEN: [qiankun]: Target container with #view-main not existed while app1 mounting!
The text was updated successfully, but these errors were encountered:
benBenXuChao
changed the title
[Bug]当router.beforeEach使用了async时,回退时会出现Target container with #view-main not existed while app1 mounting!
[Bug]当router.beforeEach使用了async时,浏览器后退时会出现Target container with #view-main not existed while app1 mounting!
Nov 10, 2024
浏览器回退时报错:Uncaught Error: application 'app1' died in status SKIP_BECAUSE_BROKEN: [qiankun]: Target container with #view-main not existed while app1 mounting!
router.beforeEach(async (to, from, next) => {
await new Promise(resolve => {
setTimeout(() => {
resolve()
}, 300);
})
next()
})
最小可复现仓库
https://github.com/EasonMar/qiankun-issue-demo.git
需要对代码进行一个小改动
改动文件路径:packages/main/src/router/index.js
将给router添加一个beforeEach
router.beforeEach(async (to, from, next) => {
await new Promise(resolve => {
setTimeout(() => {
resolve()
}, 300);
})
next()
})
export default router
复现步骤,错误日志以及相关配置
点击子应用路由后,点击浏览器的前进后退按钮
相关环境信息
"vue": "3.2.31",
"qiankun": "2.7.0",
The text was updated successfully, but these errors were encountered: