element ui 改变表格边框颜色

使用element-ui做表格很方便,但是样式调整比较麻烦,特意记一下
需要取消组件内样式的scoped,并提高权重,否则无法生效

<style lang="scss">
    @import "../../../assets/style/common";
    .el-table--border:after,
    .el-table--group:after,
    .el-table:before { 
        background-color: $borderColor!important;
    }

    .el-table--border,
    .el-table--group { 
        border-color: $borderColor!important;
    }

    .el-table td,
    .el-table th.is-leaf { 
        border-bottom: 1px solid $borderColor!important;
    }

    .el-table--border th,
    .el-table--border th.gutter:last-of-type { 
        border-bottom: 1px solid $borderColor!important;
    }

    .el-table--border td,
    .el-table--border th { 
        border-right: 1px solid $borderColor!important;
    }
    .el-table td, .el-table th.is-leaf { 
        border-bottom: 1px solid $borderColor!important;
    }
    .el-table td,.building-top .el-table th.is-leaf { 
        border-bottom:  1px solid $borderColor!important;
    }
</style>
    原文作者:安薇拉
    原文地址: https://blog.csdn.net/m0_46977781/article/details/108094748
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞