Looping a block of code in IE 11

前端 未结 3 964
感动是毒
感动是毒 2021-01-21 00:35

For a project, I need to loop through a list of objects given in javascript, and display them horizontally in a html table. Example here: https://jsfiddle.net/50wL7mdz/83227/

3条回答
  •  一生所求
    2021-01-21 01:34

    EDIT: don't read this one, it is only accurate for Vue 1!

    I don't think you're going to be able to do this currently. IE simply does not allow template tags, so the only way to do this is using and have a separate component (with a single root element) which can be applied to the tr or td. Looping through each element and adding 3 tds per cannot be done.

    Again, using the is attribute on a tr or td is the current solution, but that does not allow for multi-root components as you have requested. Perhaps you can create a component for each car and do and then style the TD to look like 3 columns.

提交回复
热议问题