D
D
danilr2020-01-19 19:17:17
Vue.js
danilr, 2020-01-19 19:17:17

How to pass a second parameter to the method, in addition to the event parameter?

There are inputs that work on the same principle, but must write the entered values ​​to different places. I wanted to add one handler to all inputs, but I didn’t understand how to recognize which of the inputs worked (for this I wanted to somehow pass the second parameter for identification)
How to pass a parameter to the handler in order to receive both the event event and the parameter in the method?
like @click="handle(event, customParam)"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2020-01-19
@danilr

@click="event => handle(event, customParam)"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question