element ui中 table el-table 设置表头和表格内容文本居中的方法

<el-table-column 
  prop="publishPlatform" 
  label="发布平台" 
  align="center" 
  header-align="center" 
  width="200">
</el-table-column>

小结:

1. element ui中控制表头和表格数据居中的有两个属性 align和header-aligh

2. 其中aligh是表格对齐方式默认为left,header-align为表头对齐方式

3. 在不设置header-aligh表头对齐方式的情况下,则默认使用表格的对齐方式

猜你喜欢

转载自blog.csdn.net/a1059526327/article/details/108317998