vue elemnet table 使用插槽实现表头渲染html内容

<el-table-column prop="OutputValueCity" label="产值<br>(万元)" min-width="10" align="right">
            <template slot="header" slot-scope="{ column }">
              <span v-html="column.label"></span>
            </template>
          </el-table-column>

 

设置表头调试:

/deep/.header {
  color: black;
  height: 52px;
}
/deep/.el-table th{
  padding: 0 !important;
}
/deep/ .el-table__header-wrapper{
  height: 52px;
}