el-table行错乱

326 阅读1分钟

网上有很多的方法、但是始终没效果、但是解决方法找到了 如下:

image.png 一、添加css样式

/* 修改element表头错位的问题 */
.el-table--border th.gutter:last-of-type {
   display: block !important;
    width: 17px !important;
}

二、在table中定义一个ref 的命名configurationTable

/* 请求数据之后重新加载表格 */
  this.$refs.configurationTable.$el.style.width = '99.99%'

此外再赠送一个改变滚动条样式的方法

/* 修改滚动条的样式 */
::-webkit-scrollbar {
    width: 10px;
    height: 8px;
}
::-webkit-scrollbar-thumb {
    background-color: #a1a3a9;
    border-radius: 3px;
}

————————————————

原文链接

ps: this.$refs.table.doLayout()未生效