A
A
Alexander2017-10-17 20:28:38
Vue.js
Alexander, 2017-10-17 20:28:38

How to load the required component in vuejs using?

Good evening, I am writing a project now and implementing the front on vuejs. I have a page where there is a form, there is a drop-down list, I need it so that when you select any value in the drop-down list, the form is shown for this particular value. Each value in the list must have a different form. In which direction should I dig? I use single file components. 1 component - 1 form.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0xD34F, 2017-10-17
@AlexMine

In sense - want to dynamically change components? You can do this: put an array describing your forms in data, build a drop-down list based on it. Also, create a variable that will contain the name of the currently selected component, bind it to the list via v-model. Use it to select a component. Somehow so .

A
Anton Anton, 2017-10-17
@Fragster

https://ru.vuejs.org/v2/guide/components.html#%D0%...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question