Skip to content

Commit

Permalink
chore(Preview): 消除 onerror 参数类型错误
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjue666 committed Oct 8, 2023
1 parent a5a11fb commit ec33820
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Preview/src/Functional.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ec33820

Please sign in to comment.