types(ImagePreview): swipeTo should be optional (#6727)

This commit is contained in:
neverland 2020-07-07 17:07:33 +08:00 committed by GitHub
parent 67be6f4f02
commit bf0f655c72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,9 +20,9 @@ export type ImagePreviewOptions =
closeOnPopstate?: boolean;
closeIconPosition?: string;
getContainer?: string | (() => Element);
onClose?: () => void;
onChange?: (index: number) => void;
swipeTo(index: number, options?: SwipeToOptions): void;
onClose?(): void;
onChange?(index: number): void;
swipeTo?(index: number, options?: SwipeToOptions): void;
};
export class VanImagePreview extends VanPopupMixin {