<el-descriptions class="desc">
<el-descriptions-item label="审核状态">
<span v-if="basicValue.status<=1">未完成</span>
<span v-if="basicValue.status === 2">待审核</span>
<span v-if="basicValue.status === 11">未通过</span>
<span v-if="basicValue.status === 12">已通过</span>
</el-descriptions-item>
</el-descriptions>
此时要设置el-descriptions-item__label(审核状态)的样式,html没有直接的class=“el-descriptions-item__label”
无效写法:
<style lang="scss" scoped>
.desc{
.el-descriptions-item__label{ //无效
font-size: 20px;
}
}
</style>
有效写法:
<style lang="scss" scoped>
::v-deep .desc{
.el-descriptions-item__label{ //有效
font-size: 20px;
}
}
</style>
重点:
::v-deep