官网的说明里没有讲清楚
以上图中框出的两个属性进行说明,只需要返回style字符串就可以
<el
-table
:header
-cell
-style
="headerCellStyle" :cell
-style
="cellStyle"></el
-table
>
然后再script里
headerCellStyle({ row
, rowIndex
}) {
return 'background-color: #F2F6FF;text-align: center;'
},
cellStyle({ row
, rowIndex
}) {
return 'text-align: center;'
}
这样就能生效了
转载请注明原文地址:https://blackberry.8miu.com/read-32106.html