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

主应用通过动态路由跳转子应用,刷新后,退出到登录页,登录页的css被子应用污染 #1370

Open
yunguang opened this issue Sep 19, 2024 · 0 comments

Comments

@yunguang
Copy link

问题描述

问题的具体描述
主应用的登录页通过动态添加路由的方式跳转到子应用,然后子应用当前路由手动刷新,再返回到登录页,主应用登录页的css自动加上了子应用的前缀,导致css失效 (注:静态路由方式没有问题;如果没有手动刷新返回登录页也没有问题)

复现步骤

  1. 主应用的登录页通过后端获取动态路由菜单;
  2. 登录后动态添加路由的方式,跳转到子应用
  3. 子应用当前页面手动刷新,再通过退出登录,返回到登录页
  4. 登录页的css被子应用污染,导致页面展示有问题

上传截图

请上传代码截图、控制台、终端等截图以帮助我们了解您的问题。
主应用登录页css样式:
image

被子应用污染后的样式:
image

复现仓库

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

环境信息

  • micro-app版本:1.0.0-rc.3
  • 主应用前端框架&版本: "vue": "^3.3.11" "vue-router": "^4.2.5" "ant-design-vue": "4.x",
  • 子应用前端框架&版本:同上
  • 构建工具&版本: vite ^5.0.10
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

1 participant