[Vuejs]-How to v-bind method without execute "automatically"?

0đź‘Ť

âś…

When you write the handler like this “endHandler(imageId)” you are executing the handler, instead passing the function’s pointer/reference.

In order to avoid that behaviour, you may need to wrap the handler call with a inline (anonymous) function like this:

<v-card ... v-touch:start="startHandler" v-touch:end="function() { endHandler(imageId); }">
     <v-img ... >
     </v-img>
</v-card>

Leave a comment