[Vuejs]-How to load default form values into vue object?

0👍

There is a explanation for v-model in the Doc:

<input v-model='something'>

is just syntactic sugar for

<input :value='something' @input="value => { something = value }">

So after you assign value to input, Vue would reset the value of input by something from data of Vue instance like above. That means you couldn’t pass default form field value into Vue object by value attribute of input tag.

For initialization, you can try to directly set Vue object when you init Vue instance, or modify Vue object in Callback function of dynamic access to default values.

Hope for you a little help.

Leave a comment