[Vuejs]-A good way to fill my form, after getting json data

0👍

✅

You shouldn’t need a plug-in.

In VueJS, you can bind data to a form element using v-model.

So let’s say you have an object:

view: {
    foo: ‘bar’
}

You can use this 


<input type=“text” v-model=“view.foo” />

In this case, when foo is set by your axios callback, the text box will automatically update its value. And likewise, when you change the text in the input, your object will update. This is called two-way binding.

Leave a comment