E
E
Ewars2017-02-19 18:59:00
Vue.js
Ewars, 2017-02-19 18:59:00

How to dynamically add fields in Vue?

It is necessary that when you click on "+ Add Place" the same rendered (!) line of fields appears. How to be?bcba688f0dbb44379a6a9a3d0d3cc125.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan Bogachev, 2017-02-19
@ewars

Since the question is abstract (only the devil knows how you organized the division into components, what kind of storage, etc.), the answer will be the same - codepen . But the general idea can be understood.

D
Dima, 2017-02-19
@v_m_smith

Vue seems to be a cool thing! Now I'm just figuring it out.
In your case, you just need to replenish the array
https://jsfiddle.net/0mx8mtcj/1/
A set of methods for working with arrays in Vue https://vuejs.org/v2/guide/list.html#Array-Change-...

S
synapse_people, 2017-10-22
@synapse_people

It can be simpler, read about database replication

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question