-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
Warn if colon shorthand is used on v-if/v-html/etc. #10191
Comments
I've seen this happen so often when teaching Vue that even though having a prop named |
Yes. If you wanted a prop, why should have the same name as a
|
I'll take this on. It'll be my first issue here. |
Thanks but as the tag suggest there is already a Pull request for this |
习惯就好 |
I was going to give it a go but it seems there's a super old PR for this already |
Why is this issue still open? |
Niu Bi |
Why is this issue still open ? |
Just to make it clear: I opened this issue, but that does not mean I have the right to merge PRs. |
@simonhermann when we say why issue is open, it's a question to maintainers obviously. |
What problem does this feature solve?
I just spent way too long debugging something really weird until I realized I accidentally wrote
:v-if
instead ofv-if
.A warning when wrongly using shorthands like
:
on "native" vue attributes could prevent this bad experience easily.What does the proposed API look like?
:v-if="foo"
--> console.warn("You specified v-bind:/ v-on: or a corresponding shorthand on a Vue attribute like v-if or similar. Usually this does not make sense.)
The text was updated successfully, but these errors were encountered: