-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
When the image url is returned 404, it will triggere onerror event.
I want to use it as such, but it does not take effect
<template>
<img :src="avatarUrl" @onerror="imageLoadOnError" />
</template>
<script>
export default {
methods: {
imageLoadOnError () {
this.avatarUrl = DEFAULT_AVATAR
}
}
}
</script>
guoyucheng, niklaz, kmc059000, david-meza, cellcastonline and 16 moreabdullah, agekazu, douira, mzcc666GtHb, rribou and 1 morestefanzan
Metadata
Metadata
Assignees
Labels
No labels