Fixed #4222 - Avatar: Return target in error event callback
parent
e7f11e883e
commit
81de29c8ca
|
@ -53,7 +53,14 @@ const AvatarSlots = [
|
|||
const AvatarEvents = [
|
||||
{
|
||||
name: 'error',
|
||||
description: 'Triggered when an error occurs while loading an image file.'
|
||||
description: 'Triggered when an error occurs while loading an image file.',
|
||||
arguments: [
|
||||
{
|
||||
name: 'event',
|
||||
type: 'object',
|
||||
description: 'Browser event'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ export interface AvatarEmits {
|
|||
/**
|
||||
* Triggered when an error occurs while loading an image file.
|
||||
*/
|
||||
error(): void;
|
||||
error(event: Event): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,8 +17,8 @@ export default {
|
|||
extends: BaseAvatar,
|
||||
emits: ['error'],
|
||||
methods: {
|
||||
onError() {
|
||||
this.$emit('error');
|
||||
onError(event) {
|
||||
this.$emit('error', event);
|
||||
},
|
||||
getPTOptions(key) {
|
||||
return this.ptm(key, {
|
||||
|
|
Loading…
Reference in New Issue