image error handling

UI Components for Vue
Post Reply
Posts: 1
Joined: 22 Sep 2022, 10:51

22 Sep 2022, 10:58

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(" @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 $("defimg") == "undefined"
? "question-icon.jpg"
: $("defimg");
$("src", this.$conf.IMG + defaultImage);

started getting this after update:
Uncaught TypeError: Cannot read properties of undefined (reading 'target')


Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests