Browse Source

chore(Preview): 消除 onerror 参数类型错误

pull/3112/head
invalid w 3 years ago
parent
commit
ec33820bf9
  1. 4
      src/components/Preview/src/Functional.vue

4
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,

Loading…
Cancel
Save