matfish2 / vue-formular

a comprehensive vue.js form component
https://www.npmjs.com/package/vue-formular
MIT License
43 stars 11 forks source link

Integration with v-model #6

Closed rkrishnamoorthy closed 8 years ago

rkrishnamoorthy commented 8 years ago

Hi Thanks for this component. Love the ease of use. But how do you integrate it with v-model ?

Cheers, rk

matfish2 commented 8 years ago

V-model is already integrated into each of the fields as their value. To programatically manipulate it use setValue. To get the value simply get the value prop off the field. Assign a v-ref to the field to access its methods and props

Sent from my Samsung device

-------- Original message -------- From: rkrishnamoorthy notifications@github.com Date: 2016/07/12 4:19 AM (GMT+02:00) To: matfish2/vue-formular vue-formular@noreply.github.com Subject: [matfish2/vue-formular] Integration with v-model (#6)

Hi

Thanks for this component. Love the ease of use.

But how do you integrate it with v-model ?

Cheers, rk

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

rkrishnamoorthy commented 8 years ago

What i meant was with Vue's two-way binding framework. I cant specify on the tag a v-model attribute

On Tue, Jul 12, 2016 at 12:24 PM, Matanya notifications@github.com wrote:

V-model is already integrated into each of the fields as their value. To programatically manipulate it use setValue. To get the value simply get the value prop off the field. Assign a v-ref to the field to access its methods and props

Sent from my Samsung device

-------- Original message -------- From: rkrishnamoorthy notifications@github.com Date: 2016/07/12 4:19 AM (GMT+02:00) To: matfish2/vue-formular vue-formular@noreply.github.com Subject: [matfish2/vue-formular] Integration with v-model (#6)

Hi

Thanks for this component. Love the ease of use.

But how do you integrate it with v-model ?

Cheers, rk

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/matfish2/vue-formular/issues/6#issuecomment-231934057, or mute the thread https://github.com/notifications/unsubscribe/AJa3KCeet29vaCK7e2UuMPDHLcgJLgOaks5qUxcbgaJpZM4JJ8ts .

matfish2 commented 8 years ago

As I already explained v-model is set inside each field's template. You can't set a v-model on anything other than form inputs (https://vuejs.org/guide/forms.html). The value prop is serving the same purpose of v-model.