I'm using Vuetify and I have an imageA on the v-img
:src
that needs to be replaced with imageB on hover only. Now it's replacing on hover and not changing when the mouse is out.
I've tried @mouseover
<v-img
:src="imageA"
width="200px"
height="auto"
@mouseover="imageA = imageB"
>
data() {
return {
imageA: require('@/assets/images/imageA.jpg'),
imageB: require('@/assets/images/imageB.jpg'),
}
}
And also @mouseenter / @mouseleave:
@mouseenter="imageA = imageB"
@mouseleave="imageB = imageA"
Thanks