问题:[@vue/compiler-sfc] ::v-deep usage as a combinator has been deprecated. Use :deep(<inner-selector>)
//报错
<style lang="scss" scoped>
::v-deep .demo{ background: yellow; }
</style>
修改:
//正确
<style lang="scss" scoped>
:deep(.demo){ background: yellow; }
</style>
CSS深度选择器(穿透)
1、stylus的样式穿透 使用>>>(不推荐)
语法:
外层容器 >>> 组件 { }
2、sass和less的样式穿透,分别是 /deep/ 与 ::v-deep。
语法:
外层容器 /deep/ 组件 { }
外层容器 ::v-deep组件{ }