解决表格表头文字换行,导致底部拖动条消失 

this.$nextTick(()=>{                                     //动态表格加载完之后,重新布局                             
        this.$refs.Tablebom.doLayout();
      });

<el-table
      border "
      class="contractBook"
      ref="table"
      :data="mlist"
      empty-text=" "
      @row-click="rowClick"
      @header-dragend="changeColWidth"    //绑定事件
      style="width: 100%"
    >
      <el-table-column prop="name" align="center" label="姓名" min-width="21%">  / /min-width写成百分比
       ...
      </el-table-column>
       ...
    </el-table> 

 methods: {
  changeColWidth(nw,ow,col,evt){
      // console.log(nw,ow,col,evt,'拖拽');
      this.$nextTick(()=>{                                     //动态表格加载完之后,重新布局                             
        this.$refs.Tablebom.doLayout();
      });
    },

}

更多推荐