解决el-table表头错位

示例图:表头错误
在这里插入图片描述

错位原因

一般是由电脑显示的缩放引起

解决方案(两种)

在app.vue 或者 index.html 反正是根结构处,修改全局样式style

  1. 加入样式代码
  .el-table th.gutter{
    display: table-cell !important;
}
  1. 加入样式代码
.el-table--border th.gutter:last-of-type {
    display: block!important;
}

结果:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_44220845/article/details/117468438