Is it possible somehow to v-on="{ mousedown.left: handler }"
?
#10458
Unanswered
VladiStep
asked this question in
Help/Questions
Replies: 2 comments 5 replies
-
Just made a feature request here - vuejs/rfcs#651 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Maybe not the optimal way but how about you wrap the element inside a v-if and v-else?
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to add some event handlers conditionally, like this:
<... v-on="condition ? { mousedown.left: mouseDownHandler, mouseup.left: mouseUpHandler } : null"
, but as far as I know it's impossible to use the event modifiers there, right?I've tried to use
'mousedown.left': ...
, but then it just doesn't work.Beta Was this translation helpful? Give feedback.
All reactions