[Vuejs]-Output html using a Vue template tag, but without having a nested element

0👍

Delete the <template> tag completely and use render function in <script> tag. Something like this, but this code is not tested, demonstrational only.

export default {
  ...
  render (h) {
    return h('div', this.elements.map(function (elm) {
      return h(elm.render())
    })
  }
}

Leave a comment