element el-table 设置行高 和表头高度

element el-table 设置行高 和表头高度

第一种方式 使用css

 <el-table :data="ycList" border class="tableBox">
          <el-table-column prop="zb" label="异常指标" width="197" />
          <el-table-column prop="n" label="一个月内" width="119" />
          <el-table-column prop="s" label="一个月以上" width="119" />
          <el-table-column prop="h" label="合计" width="119" />
        </el-table>
 
 
/deep/.tableBox {
  th {
    padding: 0 !important;
    height: 10px;
    line-height: 10px;
  }
  td {
    padding: 0 !important;
    height: 30px;
    line-height: 30px;
  }
}


第二种方式el-element-ui的方法
 

<el-table
        v-loading="loading"
        height="calc(100vh - 210px)"
        class="exporttable"
        :data="userList"
        :header-cell-style="{
          borderColor: '#01e3ed',
          background: '#103366',
          color: '#fff',
          height: '60px',
        }"
        :cell-style="{
          borderColor: '#01e3ed',
          background: '#1a5ca8',
          color: '#fff',
        }"
        :row-style="{ height: '50px' }"
      >
        <el-table-column type="selection" width="50" align="center" />
        <el-table-column
          label="用户姓名"
          align="center"
          prop="name"
          width="120"
        />
       
      </el-table>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值