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样式隔离呀 #11

Open
thgames908 opened this issue May 15, 2023 · 3 comments
Open

没有做到基座和子应用的css样式隔离呀 #11

thgames908 opened this issue May 15, 2023 · 3 comments

Comments

@thgames908
Copy link

thgames908 commented May 15, 2023

在你的示例代码, 开发环境我在main/App.vue 上加了
.container {
color: green;
border: 1px solid;
}

子应用也有这个样式, build打包后也是一样

@lishaobos
Copy link
Owner

lishaobos commented May 16, 2023

qiankun 的隔离分两种,一种是 shadowdom,一种是类似 vue 的 css scoped,前一种因为 shadowdom 特性哪怕都有 container 类名也不会相互作用,但是也有其他要解决的问题。具体可以参考 qiankun 官网

你想要的这种类名不一样的效果 qiankun 是给不了的,你可以使用 css model 等方案把主应用的类名变得特殊。

@yizixu
Copy link

yizixu commented May 19, 2023

额,qiankun本身就没有主子应用的样式隔离

@lishaobos
Copy link
Owner

额,qiankun本身就没有主子应用的样式隔离

https://qiankun.umijs.org/zh/api#startopts

image

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

3 participants