From your code:
<v-file-input
...
v-on="on"
@mouseover="showTooltip = !showTooltip"
>
</v-file-input>
The reason for v-on="on"
will work only when click but not hovering because of v-file-input
only emit focus
and blur
events but not mouseenter
, mouseleave
nor mouseover
events.
And since v-file-input
does not emit mouseover
event, your showTooltip = !showTooltip
code will not actually be executed.
You can solve this by using native
modifier:
<v-file-input
...
@mouseenter.native="on.mouseenter"
@mouseleave.native="on.mouseleave"
>
</v-file-input>
Example
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…