问题描述:用ElementUI开发后台,使用Table组件时,表头与内容不对齐
![](https://i-blog.csdnimg.cn/blog_migrate/89dfee8562556022078876ad466a0c06.png)
解决:在全局样式中添加如下css样式
.el-table__header, .el-table__body, .el-table__footer{
width:100% !important;
table-layout: fixed !important;
}
结果:
![](https://i-blog.csdnimg.cn/blog_migrate/4dcbddf562df9dc6939758cdc98616d8.png)
问题描述:用ElementUI开发后台,使用Table组件时,表头与内容不对齐
解决:在全局样式中添加如下css样式
.el-table__header, .el-table__body, .el-table__footer{
width:100% !important;
table-layout: fixed !important;
}
结果: