el-table 某一行增加calss 行hover

/**
*某一行增加calss(渐变)
*/
 <el-table
:row-class-name="tableRowClassName"/>

 tableRowClassName({row, rowIndex}) {
        if (rowIndex%2 === 0) {
          return 'warning-row';
        }
      },

  .item ::v-deep.el-table .warning-row {
    background: linear-gradient(to right, rgba(255,255, 255, 0) 0%, rgba(33, 122, 255, 0.4) 50%,rgba(255,255, 255, 0)100%);
  }
/**
*hover
*/
#dashboard-main /deep/ .el-table__body tr:hover > td{/*//hover*/
    background: rgb(249, 113, 172) !important;
  }
[某一行增加class](https://element.eleme.io/#/zh-CN/component/table)

上一篇:mouseover和mouseout事件在鼠标经过子元素时也会触发


下一篇:鼠标事件