X
X
xXRustamXx2018-06-12 13:25:14
Vue.js
xXRustamXx, 2018-06-12 13:25:14

How to do it in Vue.js?

There is a starting block:
5b1f9f80e72cb201012068.png
When choosing 1 of 3 options, the desired block appears, the content of all blocks is different - therefore, they cannot be put into the array, because you need to call methods in the template, how can this idea be implemented?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-06-12
@xXRustamXx

the content of all blocks is different - therefore, they cannot be put into the array

shove. Let a separate property of the array elements be responsible for different content. If the content is completely different, there is nothing in common - arrange the blocks as separate components, store the name of the component in the array element - well, then v-foruse it together with :is.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question