Vue 2 arguments in inline (in-template) event handler

后端 未结 2 726
我在风中等你
我在风中等你 2021-01-03 21:58

Is it possible to access arguments/parameters passed to an emitted event within an inline / in-template handler? Something like:



        
2条回答
  •  庸人自扰
    2021-01-03 22:21

    There is something that not many people know. Inline handler besides the $event has access to arguments.

    For example I was using v-dropzone which is passing many arguments (e.g. file, response).

    By using

    
    

    will catch only the first argument.

    So the solution was:

    
    

提交回复
热议问题