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

使用 native 路由模式,线上部署后子应用状态默认被保活,设置 keep-alive 无效 #1199

Closed
jhxxs opened this issue May 9, 2024 · 5 comments
Labels

Comments

@jhxxs
Copy link

jhxxs commented May 9, 2024

问题描述

问题的具体描述

使用 native 路由模式,线上部署后子应用默认被保活,设置 keep-alive 无效。
这样很让人困扰,页面的状态默认被保活了,子应用第二次加载时不会触发自身的 mounted,

复现步骤

  1. 刷新页面,切换到子应用
  2. 子应用内部路由切换
  3. 切换到主应用其他页面
  4. 返回子应用,发现页面状态还是上次操作后的

上传截图

2024-05-09.11.01.34.mov

环境信息

  • micro-app版本:1.0.0-rc.5
  • 主应用前端框架&版本:vue@2.7 + element-ui@element-ui
  • 子应用前端框架&版本:同上
  • 构建工具&版本:vite@5.2.11
@jhxxs
Copy link
Author

jhxxs commented May 9, 2024

umd
把 umd 模式去掉后每次加载子应用都会重新加载资源

@bailicangdu
Copy link
Member

很明显的keep-alive状态,确定keep-alive的配置都去掉了吗,microApp.start的配置检查一下

Copy link

github-actions bot commented May 9, 2024

Hello @jhxxs. In order to facilitate location and troubleshooting, we need you to provide a realistic GitHub repository.
您好 @jhxxs, 为了方便定位和排查问题,我们需要您提供一个重现实例,请提供一个尽可能精简的 GitHub 仓库地址。

@jhxxs
Copy link
Author

jhxxs commented May 9, 2024

很明显的keep-alive状态,确定keep-alive的配置都去掉了吗,microApp.start的配置检查一下

我没有使用 keep-alive 属性,稍等我提供一个最小实现

#1179

Copy link

Since the issue was labeled with Need Reproduction, but no response in 7 days. This issue will be close. If you have any questions, you can comment and reply.
由于该 issue 被标记为需要可复现步骤,却 7 天未收到回应。现关闭 issue,若有任何问题,可评论回复。

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