el-table 固定列错位问题

1. 问题描述:el-table使用固定列时,使用keep-alive后页面切换导致该列错位。

image

2. 解决方法:使用el-table的doLayout方法对表格进行重新布局

image

  activated() {
    this.$nextTick(() => {
      this.$refs.myTable.doLayout();
    });
  },
posted @ 2023-01-05 15:49  Li_pk  阅读(1360)  评论(0)    收藏  举报