element-ui 表格fixed 样式修改

<el-table
          ref="multipleTable"
          :data="workManagementList"
          border
          tooltip-effect="dark"
          style="width: 100%"
          @selection-change="handleSelectionChange"
          class="newTable-paiban"
          :header-cell-style="tableCellHeard"
          :cell-style="cellStyle"
        >
</el-table>
//表格颜色背景改变
    tableCellHeard({ row, column, rowIndex, columnIndex }) {
      if (rowIndex === 0 || rowIndex === 1) {
        // 指定列号
        return "background: #273d5f;";
      } else {
        return "";
      }
    },
    cellStyle({ row, column, rowIndex, columnIndex }) {
      return "background: #1A283C;";
    },
.newTable-paiban {
  .el-table__body-wrapper{
    .el-table__body{
      tr.hover-row > td{
        background-color: #1A283C !important;
      }
    }
  }
}

猜你喜欢

转载自www.cnblogs.com/Byme/p/12690142.html