From ec33820bf989a9fe9dbfd8a8d7d568659afe2faa Mon Sep 17 00:00:00 2001 From: invalid w Date: Sun, 8 Oct 2023 18:25:11 +0800 Subject: [PATCH] =?UTF-8?q?chore(Preview):=20=E6=B6=88=E9=99=A4=20onerror?= =?UTF-8?q?=20=E5=8F=82=E6=95=B0=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Preview/src/Functional.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Preview/src/Functional.vue b/src/components/Preview/src/Functional.vue index 2fb131300..b7983813e 100644 --- a/src/components/Preview/src/Functional.vue +++ b/src/components/Preview/src/Functional.vue @@ -210,8 +210,8 @@ imgState.currentUrl = url; imgState.status = StatueEnum.DONE; }; - img.onerror = (e: Event) => { - const ele: EventTarget[] = e.composedPath(); + img.onerror = (e: Event | string) => { + const ele: EventTarget[] = (e as Event).composedPath(); ele && emit('img-error', { index: imgState.currentIndex,