Element ui 修改table表格行高
·
<el-table
v-loading="dataListLoading"
:data="dataList"
style="width: 100%"
ref="tables"
class="tab"
:row-style="iRowStyle"
:cell-style="iCellStyle"
:header-row-style="iHeaderRowStyle"
border
:header-cell-style="{
background: 'rgba(194, 210, 255, 0.3)',
color: '#040415',
}"
@selection-change="dataListSelectionChangeHandle"
:row-key="getRowsKey"
>
关键代码:
:row-style="iRowStyle"
:cell-style="iCellStyle"
:header-row-style="iHeaderRowStyle"
computed: {
iRowStyle: function ({ row, rowIndex }) {
return 'height:30px';
},
iHeaderRowStyle: function ({ row, rowIndex }) {
return 'height:30px';
},
iCellStyle: function ({ row, column, rowIndex, columnIndex }) {
return 'padding:0px'
},
},
效果:
更多推荐
已为社区贡献1条内容
所有评论(0)