当组件中包含多个根标签时,组件上设置 class,通过 $attrs.class 指定单个标签,样式不生效
Vue version
3.2.37
Link to minimal reproduction
Here is Hello world component
I am fact title
Steps to reproduce
- I have a component.
- The component have two element
- I set a class at
- however, over style don't take ffect although the class name('hello_word_width') was added to the div.
What is expected?
The class name not only be added to defind that element in multiple root elements, but also its style can take effect from parent component.
What is actually happening?
its style don't take effect.
System Info
windows
chrome
Any additional comments?
No response