html
<el-table
:data="tableData"
style="width: 100%">
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
script
第一种
在el-table里面添加
row-class-name="my-row"
在style里面添加
.my-row {
height:48px; /* 设置你想要的行高 */
}
第二种
el-table里面添加
:header-cell-style="{
borderColor: '#eee',
background: '#eee',
color: '#666',
height: '60px',
}"
:cell-style="{
borderColor: '#eee',
background: '#f1f1f1',
color: '#666',
}"
:row-style="{ height: '50px' }"