/deep/.el-checkbox__input.is-checked .el-checkbox__inner,.el-checkbox__input.is-indeterminate .el-checkbox__inner {
  background-color: #ff9213 !important;
  border: 1px solid #ff9213 !important;
}
/deep/.el-checkbox__inner:hover {
  border-color: #ff9213;
}
/deep/.el-checkbox__input.is-checked + .el-checkbox__label {
  color: #ff9213;
}
/deep/.el-checkbox__input.is-focus .el-checkbox__inner {
  border-color: #ff9213!important;
}

在这里插入图片描述

修改选中框的样式和文字点击不变颜色

//选中框和文字没对齐
  /deep/.el-checkbox {
        display: flex;
        align-items: center;
        //修改选中框的大小
        .el-checkbox__inner {
          width: 20px;
          height: 20px;
           //修改选中框中的对勾的大小和位置
          &::after {
            height: 12px;
            left: 7px;
          }
        }
         //修改点击文字颜色不变
        .el-checkbox__input.is-checked + .el-checkbox__label {
          color: #333333;
        }
        .el-checkbox__label {
          line-height: 20px;
          padding-left: 8px;
        }

选中框和文字对齐前
在这里插入图片描述
选中框和文字对齐之后
在这里插入图片描述

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐