scoped:局部的
如果没有用scoped,那么该样式就会泄漏致全局(所有引入该组件的父组件都会引入这样的样式)
可以根据实际情况,具体需求,决定是否使用 scoped 修饰
<!-- add "scoped" attribute to limit css to this component only --><style scoped>h1, h2 { font-weight: normal; } ......</style>
相信看了本文案例你已经掌握了方法,更多精彩请关注其它相关文章!
推荐阅读:
vue.js的列表数据的同步更新方法
使用vue.js有哪些注意事项
以上就是vue.js的单位件组件的详细内容。
