Vue+ELement UI el-table移入或选中某行时改变颜色

起因

出库按钮 置灰时,鼠标移入到表格的某行时,行背景颜色按钮背景颜色会被覆盖住

最初颜色

在这里插入图片描述

实现效果

修改行背景颜色
在这里插入图片描述

 
<style>
   /* 用来设置当前页面element全局table 选中某行时的背景色*/
  .el-table__body tr.current-row>td{
    background-color: #92cbf1!important;
     color: #fff;
  }
 
/*鼠标移入某行时的背景色*/
.el-table--enable-row-hover .el-table__body tr:hover > td {
   background-color: #454545 !important;
   /* color: #fff; */
}
</style>

最近更新

  1. TCP协议是安全的吗?

    2024-03-27 11:58:01       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-03-27 11:58:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-03-27 11:58:01       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-03-27 11:58:01       20 阅读

热门阅读

  1. 数据结构(四)链表实现队列和栈

    2024-03-27 11:58:01       20 阅读
  2. C# 异步和线程的区别

    2024-03-27 11:58:01       17 阅读
  3. SpringBoot+Vue项目跨域问题

    2024-03-27 11:58:01       18 阅读
  4. 51单片机超声波测距代码

    2024-03-27 11:58:01       16 阅读