1. 在组件上定义类值:
class="status_change"
![](https://img2020.cnblogs.com/blog/1614173/202108/1614173-20210818174311886-634360578.png)
2. 定义style
// 不要在style上定义socpe
<style lang="less">
.status_change{
.el-dialog__header{
background-color:#4A77AC;
.el-dialog__title,.el-dialog__headerbtn i{
color: white;
}
}
}
</style>
效果:
![](https://img2020.cnblogs.com/blog/1614173/202108/1614173-20210818174449719-1690055472.png)