Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling warnings about inline value attributes for v-model #4733

Closed
HenriMorlaye opened this issue Jan 17, 2017 · 2 comments · Fixed by #4770
Closed

Disabling warnings about inline value attributes for v-model #4733

HenriMorlaye opened this issue Jan 17, 2017 · 2 comments · Fixed by #4770

Comments

@HenriMorlaye
Copy link

HenriMorlaye commented Jan 17, 2017

Hi,

Forms generated by Phoenix HTML helpers have an inline value (like on Rails). I use Vue.js on those forms by creating the View Model data on the fly by introspecting the form inputs and values. I works fine but these warnings are no longer necessary in my case. I wonder if there could be a way to disable them?

@danieldiekmeier
Copy link

First off: You can disable all logs and warnings by setting Vue.config.silent = true. See here: https://vuejs.org/v2/api/#silent – But I understand that this is probably not what you want, because it will hide ALL warnings.

However, I would also welcome a way to exclusively turn off the warnings about the value attribute.

My use case is that I generate my HTML code with Python/Flask/WTForms. I only use Vue for some optional nice things, but would like to keep JavaScript as optional as possible. By using the value attribute, I can provide default values for everyone, not only people with JavaScript activated. I still provide an Object (with the same values) to Vue, so I don't need the warning.

@phanan
Copy link
Member

phanan commented Jan 23, 2017

This makes sense to me. IMO if the user explicitly uses v-model with provided data option, he should know by fact that the input will take its value from there instead of inline, rendering the warning (which I believe is a result from 1.x upgrade) redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants