The Page problem of switching Table developed by the combination of lement ui Tab and Table

element ui Tab and Table combine to develop the page of switching tables. When you click search, all the table data is changed, and the current table width is no problem, but when switching to other tables, the width of other tables can not be 100% full. May I ask how to solve the problem?

Mar.07,2021

call the tablesSet () function every time you click the tab. The elementUI table defaults to fixed layout, and the column width is set by table width and column width
tablesSet () {

    var tables=document.querySelectorAll('table');
    for(var i=0;i<tables.length;iPP){
      tables[i].style.width='100%'
    };
    var elHeaders=document.querySelectorAll('.el-table__header');
    for(var j=0;j<elHeaders.length;jPP){
      elHeaders[j].style.tableLayout='inherit'
    }

}

Menu