Alias for v-on and v-bind
See original GitHub issueWhat problem does this feature solve?
If you’ve decided to go with v-bind
and v-on
shorthands then v-on="$listeners"
looks out of place and creates a mixture of syntax. Shorthands for v-on
and v-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"
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
"You are binding v-model directly to a v-for iteration alias ...
The message is telling you that you can't directly modify a v-for alias (which run is). Instead you can use index to refer...
Read more >Form Input Bindings - Vue.js
When dealing with forms on the frontend, we often need to sync the state of form input elements with corresponding state in JavaScript....
Read more >Enhance Jest configuration with Module Aliases - Alex Jover
Let's go to src/App.vue and change the reference to those two components: import MessageList from '@/components/MessageList' import ...
Read more >jQuery.noConflict() | jQuery API Documentation
Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery's case, $ is just an alias...
Read more >Working with Certificates and SSL (Sun Java System ...
Display certificate information from a keystore of type JKS. keytool -list -v -alias ${cert.alias} -keystore ${keystore.file} -storepass ${keystore.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t think this is a good idea,
v-bind=
andv-on=
do not happen that often to offer a shorthand syntax that is confusing. Having the full text version makes things more readable since it’s a v-bind or v-on without argument is so different from one with an argument. So I think having both v-bind and v-on is actually a good thing because they are visible (or out of place) while:=
and@=
are notOne great thing about
@
and:
aliases is that they are instantly recognizable, and I couldn’t say that aboutv-bind
andv-on
. I would say that it is one of the main reasons people prefer this syntax over the other.