Answer the question
In order to leave comments, you need to log in
Why doesn't the @error event fire in Vue?
The image is not on the page. The console writes
GET localhost:3000/portfolio/someDirection/topMob.jpg 404 (Not Found)
I insert the image itself like this
<img :src="imgSrc" @error="logError" alt="not work" />
imgSrc() {
return `../someDirection/topMob.jpg`
}
logError() {
console.log("No image")
}
imgSrc() {
return `../someDirection/topMob.jpg ломаю путь`
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question