-
-
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
Alias for v-on and v-bind #9190
Comments
I don't think this is a good idea, |
One great thing about |
Exactly, so making the non-argument version of v bind and v on also have
that would defeat that purpose
On Wed 12 Dec 2018 at 19:30, Stanislav Lashmanov ***@***.***> wrote:
One great thing about @ and : aliases is that they are instantly
recognizable, and I couldn't say that about v-bind and v-on. I would say
that it is one of the main reasons people prefer this syntax over the other.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9190 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAoicXWTfMCnoMOeeSn0d68iws3SCC0yks5u4Us-gaJpZM4ZPXUa>
.
--
Eduardo San Martin Morote
|
We'll have to agree to disagree on this one. For me mixing This also goes well with official Vue style guide. Right now you're basically breaking the rule with these directives because you have no other option. The same applies to |
v-on="myListeners" or @="myListeners" How to register native events? |
As we discussed a shorthand for v-slot, we also talked about these shorthands not being in line with Vue values of being approachable and intuitive. More at vuejs/rfcs#3 (comment) |
What problem does this feature solve?
If you've decided to go with
v-bind
andv-on
shorthands thenv-on="$listeners"
looks out of place and creates a mixture of syntax. Shorthands forv-on
andv-bind
would solve that issue.What does the proposed API look like?
v-on="$listeners"
should be aliased like this:@="$listeners"
v-bind="$attrs"
should be aliased like this::="$attrs"
The text was updated successfully, but these errors were encountered: