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

https://blog.csdn.net/m0_71645665/article/details/139296035

  <div style="height:90%;overflow-y:scroll">
    <el-table :data="tableData" style="width: 100%;" row-key="id" border
              :default-expand-all ="false"  :header-cell-style="{height: '60px'}"
              :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
      <!--      <el-table-column type="index" align="center">sortable</el-table-column>-->
      <el-table-column prop="dIndex" label="序号" align="center" fixed></el-table-column>
      <el-table-column  prop="jdName" align="left" header-align="center"  label="所属XX"  width="180" fixed></el-table-column>
      <el-table-column  prop="sqName" align="left" header-align="center"  label="所属XX"   width="180" fixed></el-table-column>
      <el-table-column v-for="(item,index) in dicData" :key="index"
                       :label="item.label" :prop="item.prop" width="150" align="center" header-align="center">
      </el-table-column>
    </el-table>
  </div>
posted @ 2024-07-15 10:16  寒冷的雨呢  阅读(370)  评论(0编辑  收藏  举报