In IE11, a fixed width='100' is set for each column in a loop of multiple EL-tables. Possible cause: When the EL-Table is circulating, the width of the table in Ie does not have a value. Therefore, you cannot set the width of each column. (Above their own blind analysis, do not listen to mistakes)Copy the code

Solution and code:

Get a table element. 2. Use the window.getComputedStyle method to return the final style result of the table element. Loop through all the tables and set the width for each tableCopy the code
if (IEVersion() === 11) {
  let node = document.getElementsByClassName('el-table') [0]
  let computedNode = window.getComputedStyle(node, null)
  Array.from(document.getElementsByClassName('el-table')).forEach((el, idx) = > {
    el.style.width = computedNode.width
  })
}
Copy the code