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

[bug report] invalid CSS v-bind in El dialog #4037

Closed
wanderbaby opened this issue Oct 26, 2021 · 5 comments
Closed

[bug report] invalid CSS v-bind in El dialog #4037

wanderbaby opened this issue Oct 26, 2021 · 5 comments
Labels

Comments

@wanderbaby
Copy link

Element Plus version

1.1.0-beta.24

OS/Browsers version

chrome 95

Vue version

3.2.20

Reproduction Link

https://codesandbox.io/s/element-plus-spa-forked-6v051?file=/src/dialog.vue:70-76

Steps to reproduce

  • 把弹框作为根节点组件
  • 添加appent-to-body
  • 在css中使用v-bind绑定setup中的变量无效

What is Expected?

希望考虑一下这种情况要怎么实现

What is actually happening?

在css中使用v-bind,vue把当前编译好的带hash值的变量通过style的方式关联到根节点的dom上,但是把dialog作为根节点时,el-dialog自定义了一段style样式

@element-bot element-bot changed the title [Bug Report] el-dialog中使用css v-bind无效 [bug report] invalid CSS v-bind in El dialog Oct 26, 2021
@element-bot
Copy link
Member

Translation of this issue:

Element Plus version

1.1.0-beta.24

OS/Browsers version

chrome 95

Vue version

3.2.20

Reproduction Link

https://codesandbox.io/s/element-plus-spa-forked-6v051? file=/src/dialog.vue:70-76

Steps to reproduce

*Take the bullet frame as the root node component

*Add app to body
*Using v-bind in CSS to bind variables in setup is invalid

What is Expected?

I hope to consider how to achieve this situation

What is actually happening?

Using v-bind in CSS, Vue associates the currently compiled variables with hash values to the dom of the root node in style. However, when dialog is used as the root node, El dialog customizes a style

@zhengyangkang
Copy link

同样的问题,appent-to-body后无法使用变量注入scss(v-bind),需要开放body的style参数或者支持该变量注入。
For the same problem, variable injection SCSS (v-bind) cannot be used after Appent to body. You need to open the style parameter of body or support this variable injection

@YunYouJun
Copy link
Member

A temporary solution: just use css var.

@github-actions github-actions bot removed the inactive label Mar 12, 2022
@chenxch chenxch added the 🔨 Vue issue Issue caused by Vue. Can't do anything label Sep 4, 2022
@chenxch
Copy link
Member

chenxch commented Sep 4, 2022

vue issue

@github-actions github-actions bot removed the inactive label Sep 4, 2022
@chenxch chenxch closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2023
@wanderbaby
Copy link
Author

wanderbaby commented Apr 15, 2023 via email

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

6 participants