-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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 #3596
Comments
What about when using https://jsfiddle.net/s2orke8c/ No warning is thrown but maybe one should be thrown in this case, unless this is a bug. |
@phanan I think your input would be valuable here |
Hmm, TBH I'm not sure why this 1.x behavior was revived in v3, but I still tend to agree with 4-year-ago me 😄 that this warning isn't extremely helpful. Again, as the original v2 issue author said, there are frameworks/libraries/CMSes that generate inline |
what about |
AFAIU there's no warning for |
Now that I read the comment again, I was more thinking of a |
That makes perfect sense @posva. The two bindings with conflicting effects should have a warning. Binding vs static shouldn't. |
I personally feel that |
It seems the order of the attributes is important. See the following: https://jsfiddle.net/xm270v6y/ Therefore my new conclusion is that it should throw a warning if There is a similar issue when using https://jsfiddle.net/jbfqsgd1/ Once again I feel these warnings are counter intuitive and actually discourage one of the great features of Vue in that you can render an initial value (which matches the data-bound value) and have Vue later override it. One use case for this is for multi-page applications where I have replaced some of the jQuery plugins with Vue components. If the server-side rendered code doesn't match the output after the Vue instance is mounted then there will be a flicker as the content changes. |
I've been looking at petite-vue this weekend and that's exactly how I've been using Vue. This is why I believe these warnings should be removed since they interfere with SSR and Vue should ideally be a superset of Petite-Vue. |
Any update on this? Another idea would be to add a config option to ignore particular warnings. |
Any update on this for 2023? It would be great to be able to control this warning. |
Version
3.0.11
Steps to reproduce
Open the following:
https://jsfiddle.net/zqystjur/
The following warning will be thrown:
[Vue warn]: Template compilation error: Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.
This seems to relate to the following Vue 2 issue:
vuejs/vue#4733
The text was updated successfully, but these errors were encountered: