-
-
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
v-bind shorthand for equal property and attribute name #8457
Comments
Haven't found that in google results. Thanks. |
With ES6 syntax, you can write: <Component v-bind="{ foo, bar, baz}" /> That's equivalent to: <Component :foo="foo" :bar="bar" :baz="baz" /> More details on Vue API docs. |
@leopiccionia, thanks! |
@leopiccionia can you handle camelcase to kebabcase conversion automatically ? |
Vue 3.4 now supports this feature. See vuejs/core#9451 or the Announcement |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What problem does this feature solve?
Sometimes we're binding attributes to the props that have exactly the same name. So we could simplify
v-bind:attr="attr"
or:attr="attr"
to just this::attr
.What does the proposed API look like?
Equals to
Equals to
The text was updated successfully, but these errors were encountered: