Skip to content

Add support for object destructuring in v-on #5926

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

Closed
maurop123 opened this issue Jun 19, 2017 · 3 comments
Closed

Add support for object destructuring in v-on #5926

maurop123 opened this issue Jun 19, 2017 · 3 comments

Comments

@maurop123
Copy link

What problem does this feature solve?

When declaring components, this sort of repetitive syntax occurs a lot:

<component @log="log" @alert="alert" />

This feature would allow event declarations to be more DRY, similar to the way v-bind currently works:

<component v-bind="{foo, bar}" />

What does the proposed API look like?

<component v-on="{log, alert}" />
@posva
Copy link
Member

posva commented Jun 20, 2017

dup of #5578

@posva posva closed this as completed Jun 20, 2017
@maurop123
Copy link
Author

@posva although this issue is very similar to #5578, the difference between the proposed API of each one is significant, so can this issue be reopened?

@posva
Copy link
Member

posva commented Jun 20, 2017

I see the same API with different examples: one using native events and other using custom events (with es6 object syntax)
Did I miss something?
We'll only keep one issue opened though, feel free to share your thoughts on the other issue 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants