scoped 中的 css 样式只会作用于当前组件的元素 #700
guaijie
started this conversation in
RFC Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
文档中明确说明,scoped 中的 css 样式只会作用于当前组件的元素,而事实上却并非如此
后续的描述又对前面的进行了补充说明,但这两者的描述确实矛盾的
该链接阐述了为什么 vue 维护者对 scoped 设计是不合理的
官方应该简化 scoped 作用逻辑,正如文档所说:‘scoped 中的 css 样式只会作用于当前组件的元素’
Beta Was this translation helpful? Give feedback.
All reactions