<img :src="imageUrl" @click="flipImage" :style="imgStyle">
data() {
return {
isFlipped: false,
imageUrl: "url",
imgStyle: {
transform: "",
transition: "transform 0.6s ease"
}
}
}
flipImage() {
this.isFlipped = !this.isFlipped;
if (this.isFlipped) {
this.imgStyle.transform = "scaleX(-1)";
} else {
this.imgStyle.transform = "";
}
}