[Vuejs]-Vue.js render multiple slots

0👍

You could put the slots into elements you create I believe. This is mentioned (briefly) in the render function documentation.

This may not be exactly the layout you want, but for example,

<script>
import LayoutBlankTemplate from './LayoutBlankTemplate'

export default {
  name: 'LayoutBlank',
  created() {
    this.$parent.$emit('update:layout', LayoutBlankTemplate);
  },
  render(createElement, context) {
    return createElement('div', {}, [
      createElement('div', {}, this.$slots.default),
      createElement('div', {}, this.$slots.second)
    ])
  },
}
</script>

Leave a comment