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] 在popup二次封装的组件上使用scoped的class,不生效 #12927

Closed
vito24 opened this issue Jun 11, 2024 · 1 comment
Closed

Comments

@vito24
Copy link

vito24 commented Jun 11, 2024

重现链接

https://stackblitz.com/edit/vitejs-vite-2hryqf?file=src%2FApp.vue

Vant 版本

4.9.1

描述一下你遇到的问题。

对popup进行二次封装,然后在这个二次封装的my-popup组件上使用scoped的class,不生效

重现步骤

  1. 点击按钮
  2. 查看popup的class,虽然class属性中有red,但是red不生效
    image
    image

设备/浏览器

No response

@inottn
Copy link
Collaborator

inottn commented Jun 11, 2024

看了下,这和 vue scoped 功能相关,不属于 vant 的 bug。可查阅 https://cn.vuejs.org/api/sfc-css-features.html#scoped-css

@inottn inottn closed this as completed Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants