1 新加一个style 不要使用scoped
<style>
.labelAll .el-form-item__label {
color: red !important;
}
</style>
效果如下
2.新加一个scss的style 不使用scoped
<style lang="scss">
.dayText {
.el-calendar-table {
thead {
background-color: rgb(46, 190, 183);
}
}
}
</style>
效果如下
3.新加一个scss的style 使用scoped
<style lang="scss" scoped>
/deep/ .dayText {
.el-calendar-table {
thead {
background-color: red;
}
}
}
</style>
效果如下
以上的方法 都需要你在组件外面的div起class名
表单我起的是labelAll
日历我起的是dayText