Because element el-Table’s default row height is not appropriate, it is sometimes necessary to set a custom row height for the EL-Table
Add a class to table
<el-table
class="tableBox"
v-loading="loading"
:data="tableData"
height="700px"
:cell-class-name="changeCellClass"
style="width: 100%;">
<el-table-column
fixed
prop="trading_day"
label="TradingDay"
width="120">
</el-table-column>
Copy the code
To write CSS
<style lang="scss">
.tableBox {
th {
padding: 0 ! important;
height: 48px;
line-height: 48px;
}
td {
padding: 0 ! important;
height: 48px;
line-height: 48px;
}
}
</style>
Copy the code