::v-deep usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead.
Vue 3.0使用 sass 预处理器使用 ::v-deep 深度选择器抛出如下警告由于 Vue 3.0 单文件规范中深度选择器 ::v-deep 写法已经被废弃// 报错前的用法.container {::v-deep .box {left: 270px;}::v-deep .main {padding-left: 250px;}}.container {:v-deep(.box) {left:
·
Vue 3.0使用 sass 预处理器使用 ::v-deep 深度选择器抛出如下警告
由于 Vue 3.0 单文件规范中深度选择器 ::v-deep、/deep/、>>> 写法已经被废弃
// 报错前的用法
.container {
::v-deep .box {
left: 270px;
}
::v-deep .main {
padding-left: 250px;
}
}
.container {
:deep(.box) {
left: 270px;
}
:deep(.main) {
padding-left: 250px;
}
}
如果需要对多个盒子穿透设置相同得样式则如下:
:deep(.el-table th),
:deep(.el-table td) {
background: none;
color: #000;
font-weight: 300;
border-right: solid 1px #dbdbdb;
}
更多推荐
已为社区贡献1条内容
所有评论(0)