Passing event and argument to v-on in Vue.js

前端 未结 3 1381
青春惊慌失措
青春惊慌失措 2020-12-04 09:37

I pass a parameter in v-on:input directives. If I don\'t pass it, I can access the event in the method. Is there any way I can still access the event when passi

3条回答
  •  旧时难觅i
    2020-12-04 10:30

    You can also do something like this...

    
    

    Evan You himself recommended this technique in one post on Vue forum. In general some events may emit more than one argument. Also as documentation states internal variable $event is meant for passing original DOM event.

提交回复
热议问题