Skip to content

[Bug反馈] StyleProvider组件只能在第一次使用时注入样式,后续使用均会丢失样式 #6912

@xiaoqiang1999

Description

@xiaoqiang1999
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.0.1

Environment

Windows11 / Chrome & Edge / Vue 3.3.4

Reproduction link

Edit on CodeSandbox

Steps to reproduce

使用ShadowDOM隔离CSS样式,多次使用StyleProvider指定container,只会在第一次使用StyleProvider时有样式,其余均丢失样式。
注:Antd的React版本无此问题,会正常的向不同的container中注入样式。

详见CodeSandbox:https://codesandbox.io/p/sandbox/confident-fog-f94y8w

What is expected?

多个StyleProvider的container分别拥有自己的样式

What is actually happening?

使用ShadowDOM隔离CSS样式,多次使用StyleProvider指定container,只会在第一次使用StyleProvider时有样式,其余均丢失样式。

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions