// 在el-table上添加下面两行即可
:cell-style="{ textAlign: 'center' }"
:header-cell-style="{ 'text-align': 'center' }"
<el-table
:data="goodsList.goodsTable"
style="width: 100%"
empty-text="暂无数据"
:cell-style="{ textAlign: 'center' }"
:header-cell-style="{ 'text-align': 'center' }"
>
<el-table-column prop="name" label="商品名称" />
</el-table>
element plus表格的表头和内容居中
猜你喜欢
转载自blog.csdn.net/zzll1216/article/details/131242528
今日推荐
周排行