element UI表格行高、padding等设置报错问题

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>
 

 

posted @ 2019-07-30 10:54  清风引佩下瑶台  阅读(7920)  评论(0编辑  收藏  举报