Skip to content
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

How to pass arguments? #24

Open
gonnavis opened this issue Oct 13, 2018 · 2 comments
Open

How to pass arguments? #24

gonnavis opened this issue Oct 13, 2018 · 2 comments

Comments

@gonnavis
Copy link
Contributor

For example, v-hammer:tap="add(item, i)" now is not working.

@gonnavis
Copy link
Contributor Author

I find the solution v-hammer:tap="function(){ add(item, i) }", but a little ugly.

@lb01910483
Copy link

lb01910483 commented Oct 17, 2018

you can use v-hammer:tap="() => testFunction(arg)" if you want to original event you can pass like

(originalevent) => testFunction(originalevent, args)

maybe more elegant

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

No branches or pull requests

2 participants