Solve the misalignment of el-table header

Example image: Header error
Insert image description here

Cause of dislocation

Usually caused by the scaling of the computer display

Solutions (two types)

In app.vue or index.html, which is the root structure anyway, modify the global style style

  1. Add style code
  .el-table th.gutter{
    display: table-cell !important;
}
  1. Add style code
.el-table--border th.gutter:last-of-type {
    display: block!important;
}

result:
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_44220845/article/details/117468438