el-table修改表头

表格
<el-table v-loading="loading" :data="preventionList">
  <el-table-column label="业务工作" align="center" prop="businessWork" />
  <el-table-column label="责任人" align="center" prop="personLiable" />
  <el-table-column label="岗位名称" align="center" prop="jobTitle" :formatter="jobTitleFormat" />
  <el-table-column label="岗位等级" align="center" prop="postGrade" :formatter="postGradeFormat" />
  <el-table-column label="风险等级" align="center" prop="riskLevel" :formatter="riskLevelFormat" />
  <el-table-column label="责任领导" align="center" prop="responsibleLeadership" />
  <el-table-column label="廉政风险点" align="center" prop="riskPointsOfCleanGovernment" />
  <el-table-column label="所属领域" align="center" prop="field" :formatter="fieldFormat" />
  <el-table-column label="风险种类" align="center" prop="typesOfRisks" :formatter="typesOfRisksFormat" show-overflow-tooltip />
  <el-table-column label="防控措施" align="center" prop="preventionAndControlMeasures" show-overflow-tooltip />
</el-table>

 

样式
<style lang="scss" scoped>
  /deep/ .el-table__header tr,//修改th表头高度
  .el-table__header th {
    padding: 0;
    height: 30px;
    line-height: 30px;
  }
  /deep/ .el-table__body tr,
  .el-table__body td {//修改td单元格高度
    padding: 0;
    height: 30px;
    line-height: 30px;
  }
</style>

提示:写完文章后,目录可以自动生成,如何生成可参考右边的帮助文档

修改前

修改后

 

记录工作心得,2020/8/21打卡

Logo

前往低代码交流专区

更多推荐