[Vuejs]-How to pass a constant to a method as a parameter with vuejs

1👍

You can use currying:

<input type="text" @keypress="(e) => onKeypress(e, 'min')">
<input type="text" @keypress="(e) => onKeypress(e, 'max')">

Because the result of the event only broadcasts a single argument, you must curry any additional arguments in a function chain.

Leave a comment