J
J
jeruthadam2019-03-15 23:02:33
Vue.js
jeruthadam, 2019-03-15 23:02:33

How to hang a directive in the render function?

I can't find anything at all.

render: function (createElement) {
    return createElement(
      'div',
      [...Array(this.layers).keys()].map(i => {
        return this.$slots.default
      })
    )
  },

How to attach a directive to each element of the v-for array (slots)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-03-16
@jeruthadam

I can't find anything at all.

Bad search. The necessary information is right in the section of the documentation dedicated to the render function .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question