type(preview): fix type definition

修复Preview组件的事件参数类型定义
This commit is contained in:
无木 2021-07-26 21:18:55 +08:00
parent e23bd2696d
commit bdf0be81b0

View File

@ -6,8 +6,8 @@ export interface Options {
defaultWidth?: number; defaultWidth?: number;
maskClosable?: boolean; maskClosable?: boolean;
rememberState?: boolean; rememberState?: boolean;
onImgLoad?: (img: HTMLImageElement) => void; onImgLoad?: ({ index: number, url: string, dom: HTMLImageElement }) => void;
onImgError?: (img: HTMLImageElement) => void; onImgError?: ({ index: number, url: string, dom: HTMLImageElement }) => void;
} }
export interface Props { export interface Props {