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

element UI里面表格的行高须要本身调整高度和设置padding,直接写style是不行的,里面有 :函数

一、row-style (行的 style)    spa

二、header-row-styl   (表头行的 style)对象

三、cell-style(单元格的 style)element

若是设置行高或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>
相关文章
相关标签/搜索