element UI里面表格的行高需要自己調整高度和設置padding,直接寫style是不行的,里面有 :
1、row-style (行的 style)
2、header-row-styl (表頭行的 style)
3、cell-style(單元格的 style)
如果設置行高或padding直接在表格中寫 :row-style="height:'32px'"形式也能生效,但是會報錯,值為字符串形式不對,需要對象或函數等形式,正確寫法如下黑體處:
<el-table border :span="24"
:row-style="{height:'32px'}"
:header-row-style="{height:'32px'}" :cell-style="{padding:'1px'}">
<el-table-column></el-table-column>
<el-table-column></el-table-column>
</el-table>