element表格样式修改


 

 HTML代码:

 <el-table
            :data="tableData"
            style="width: 100%"
            border
            :row-class-name="tableRowClassName">
            <el-table-column
              prop="date"
              label="用户名">
            </el-table-column>
            <el-table-column
              prop="name"
              label="角色">
            </el-table-column>
            <el-table-column
              label="操作">
              <template slot-scope="scope">
          <el-button
            size="mini"
            type="primary"
            @click="">设置角色</el-button>
            <el-button
            size="mini"
            type="primary"
            @click="">修改密码</el-button>
          <el-button
            size="mini"
            type="warning"
            @click="">删除</el-button>
          </template>
            </el-table-column>
          </el-table>

 

 css代码:

.el-table .warning-row {/*表格斑马线*/
    background: #112336;
    }
    .el-table--border, .el-table--group {
    border:none;
    }
    .el-table .success-row {/*表格斑马线*/
        background: #142d53;
    }
    .el-table th{        /*表头颜色渐变*/
        background-image: linear-gradient(#2457a6,#133d7d );
    }
    .el-table--enable-row-hover .el-table__body tr:hover>td {/*表格选中颜色*/
        background-color: #70a6d0;
    }
    .el-table::before{/*表底部边框*/
        height: 0px
    }
    .el-table td, .el-table th.is-leaf{/*表格内容样式*/
        font-size:20px;
        border-bottom: 1px solid #112336;
    }
    .el-button--warning {  /*表格操作按钮样式*/
        background-image: linear-gradient(#b1975f,#6d390e );
        border:1px solid;
        border-color:#a77b45;
        border-radius:9px;
    }
    .el-button--primary {  /*表格操作按钮样式*/
        background-image: linear-gradient(#3487fe,#083d88 );
        border:1px solid;
        border-color:#548fe7;
        border-radius:9px;
    }
     .el-table th>.cell {/*表头样式*/
        text-align: center;
        color:#fff;
        font-size:22px
   }
     .el-table .cell{/*表格数据样式*/
        text-align: center;
         color:#bfbfbf
   }

 

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM