element-ui改造表格样式

element-ui中没有只有外边框,我内边框不要的表格 所以就做了下小改造
改造之后的效果:
在这里插入图片描述
代码

    <el-table
      class="table-detail"
      :header-cell-style="{ background: '#F7F8FA', color: '#333333' }"
      :data="tableData"
      style="width: 100%"
    >
      <el-table-column prop="date" label="日期" width="180"> </el-table-column>
      <el-table-column prop="name" label="姓名" width="180"> </el-table-column>
      <el-table-column prop="address" label="地址"> </el-table-column>
    </el-table>

样式

  .table-detail {
    border: 1px solid #dedede;
    border-top: none;
    thead {
      font-family: PingFangSC-Regular;
      font-size: 14px;
      color: #333333;
      letter-spacing: 0;
      th {
        background: #f5f5f5;
        font-weight: normal;
      }
    }
    .wait {
      color: #2d8cf0;
      border-color: rgba(45, 140, 240, 0.1);
      background-color: rgba(45, 140, 240, 0.1);
    }
    .gray {
      color: #606266;
      border-color: rgba(96, 98, 102, 0.1);
      background-color: rgba(96, 98, 102, 0.1);
    }
    .yellow {
      color: #f7b500;
      border-color: rgba(247, 181, 0, 0.1);
      background-color: rgba(247, 181, 0, 0.1);
    }
    .green {
      color: #6dd400;
      border-color: rgba(109, 212, 0, 0.1);
      background-color: rgba(109, 212, 0, 0.1);
    }
    .danger {
      color: #fa5152;
      border-color: rgba(250, 81, 82, 0.1);
      background-color: rgba(250, 81, 82, 0.1);
    }
  }
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值