hello,
i'm using @error on image components and when i updated to 3.17 the $event param stopped being passed into function.
any reason as to why?
i have this in some component:
<Image :src="showImg(slotProps.data.Image)" @error="onImageError" defimg="profiles/noface.jpg" alt="noface" class="border-round-sm" :imageStyle="{'border-radius':'5px','max-width':'70px','max-height':'70px','min-width':'60px','min-height':'60px'}" preview>
and the function in a js file:
onImageError(e) {
let defaultImage =
typeof $(e.target).attr("defimg") == "undefined"
? "question-icon.jpg"
: $(e.target).attr("defimg");
$(e.target).attr("src", this.$conf.IMG + defaultImage);
}
started getting this after update:
Uncaught TypeError: Cannot read properties of undefined (reading 'target')
thanks
image error handling
-
- Information
-
Who is online
Users browsing this forum: No registered users and 15 guests