element-ui去掉行选中背景颜色以及单元格合并

// 鼠标滑过td上作用的样式,ie6不支持:hover伪类属性,如果是ie6要写成tr.over样式
.el-table tbody tr:hover>td {
background-color:transparent!important;
}
// 如果td没有颜色,可以去掉,这里加上保险
.el-table__body tr.hover-row>td {
background-color: transparent;
}

合并单元格

`/**
* 合并项
*/
arraySpanMethod({
rowIndex, columnIndex,
}) {
if (rowIndex % 2 === 0) {
if (columnIndex === 0) {
return [1, 8];
} if (columnIndex !== 8) {
return [0, 0];
}
}

  if (columnIndex === 8) {
    if (rowIndex % 2 === 0) {
      return [2, 1];
    }
    return [0, 0];
  }
  return [1, 1];
},`
posted @ 2021-12-15 11:14  Redbreans  阅读(718)  评论(0)    收藏  举报