zoukankan      html  css  js  c++  java
  • element表格鼠标悬浮上带有点击事件的变红-:row-class-name

    element表格鼠标悬浮上带有点击事件的变红

    如图所示

     只需要在el-table标签上加一个:row-class-name

    <el-table
       stripe
       style=" 100%"
       :data="tableData"
       v-loading="isLoading"
       element-loading-text="加载中"
       element-loading-spinner="el-icon-loading"
       element-loading-background="rgba(0, 0, 0, 0.4)"
       :row-class-name="tableRowClassName"
       id="table"
    >
      <el-table-column prop="name" label="考评名称" show-overflow-tooltip :min-width="110">
                 <template slot-scope="scope">
                        <a @click="getMore(scope.row)">{{ scope.row.name }}</a>
                </template>
           </el-table-column>
    </rl-table>

     在methods里写入tableRowClassName//改变当前点击的行的class,高亮当前行

     tableRowClassName(row, index) {
           return "tableBg";
     }

    在css里面写tableBg的样式

    #table.el-table .tableBg td a {
          font-size: 14px;
          color: rgb(61, 34, 31);
        }
        #table.el-table .tableBg:hover td a {
          color: #cc0000;
          border-bottom: 1px solid#cc0000;
          cursor: pointer;
        }
  • 相关阅读:
    Prometheus—告警altermanger
    Prometheus监控Kafka
    get与post(转)
    js typeof
    设置SQL脚本大小敏感
    max Count Group by
    统计当年登陆次数
    IOC
    ORM
    [转载]C#实现获取浏览器信息
  • 原文地址:https://www.cnblogs.com/Jerry1208/p/13329059.html
Copyright © 2011-2022 走看看