From bdf0be81b029190f8fec0d49bf4c2d773170a929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=A0=E6=9C=A8?= Date: Mon, 26 Jul 2021 21:18:55 +0800 Subject: [PATCH] type(preview): fix type definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复Preview组件的事件参数类型定义 --- src/components/Preview/src/typing.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Preview/src/typing.ts b/src/components/Preview/src/typing.ts index ab0d6c75b..bbb8a83e4 100644 --- a/src/components/Preview/src/typing.ts +++ b/src/components/Preview/src/typing.ts @@ -6,8 +6,8 @@ export interface Options { defaultWidth?: number; maskClosable?: boolean; rememberState?: boolean; - onImgLoad?: (img: HTMLImageElement) => void; - onImgError?: (img: HTMLImageElement) => void; + onImgLoad?: ({ index: number, url: string, dom: HTMLImageElement }) => void; + onImgError?: ({ index: number, url: string, dom: HTMLImageElement }) => void; } export interface Props {