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>
Use @error
. And please use our forum or Gitter for questions like this. The repo issue list is strictly for bug reports and feature requests, as specified in the contributing guidelines. Thanks.
Most helpful comment
Use
@error
. And please use our forum or Gitter for questions like this. The repo issue list is strictly for bug reports and feature requests, as specified in the contributing guidelines. Thanks.