-
Notifications
You must be signed in to change notification settings - Fork 581
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
子应用挂载到父应用中的时候,子应用写的样式全部都丢失了,因为vue语法中的style有一个scoped样式隔离,去掉就正常了,但是不加会影响全局 #1466
Comments
Hello @PJK15889522750. In order to facilitate location and troubleshooting, we need you to provide a realistic GitHub repository. |
|
我降到了1.0.0-rc.15这个版本,样式还是丢失,大佬能解答一下嘛 |
你的应该是缓存问题吧,打包有没有加hash |
我的1.0.0-rc.16版本,也出现了项目中style写scoped,导致样式失效的问题 不加scoped就生效 <style lang="scss"> .main-wrapper { padding: 18px 20px 20px 20px; } </style> |
看来都有这个问题啊。子应用的css,发现data-v-hash值被改了,多了个__mock_data-xxxx,导致样式不生效, |
这个库提供的dev demo 代码,子应用都是没有加scoped,如果子应用加上scoped,样式都会失效,因为disable-scopecss禁用后,子应用的样式都会自动加上 [appName=子应用名] 子应用样式{} |
问题的点是串改了原本的css类名注入。浏览器也找不到啊 多了个复制方法 __mock_data-xxxx。应该是css隔离代码有问题 |
1.0.0-rc.17 已修复 |
Hello @PJK15889522750. The issue you reported has been fixed. This issue will be closed. Thank you for your feedback. |
问题描述
复现步骤
1.子应用挂载到父应用中的时候,子应用写的样式全部都丢失了,因为vue语法中的style有一个scoped样式隔离,去掉就正常了,但是不加会影响全局
上传截图
复现仓库
环境信息
The text was updated successfully, but these errors were encountered: