<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'
},
},
效果:
文章來源:http://www.zghlxwxcb.cn/news/detail-624331.html
?文章來源地址http://www.zghlxwxcb.cn/news/detail-624331.html
到了這里,關于Element ui 修改table表格行高的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!