1 | import type { CSSProperties, TeleportProps, ComponentPublicInstance } from 'vue';
|
2 | import type { Interceptor } from '../utils';
|
3 | import type { SwipeToOptions } from '../swipe';
|
4 | import type { PopupCloseIconPosition } from '../popup';
|
5 | import type { ImagePreviewProps } from './ImagePreview';
|
6 | import type { ImagePreviewItemProps } from './ImagePreviewItem';
|
7 | export type ImagePreviewOptions = {
|
8 | loop?: boolean;
|
9 | images: string[];
|
10 | maxZoom?: number;
|
11 | minZoom?: number;
|
12 | vertical?: boolean;
|
13 | teleport?: TeleportProps['to'];
|
14 | className?: unknown;
|
15 | showIndex?: boolean;
|
16 | closeable?: boolean;
|
17 | closeIcon?: string;
|
18 | transition?: string;
|
19 | beforeClose?: Interceptor;
|
20 | doubleScale?: boolean;
|
21 | overlayStyle?: CSSProperties;
|
22 | overlayClass?: unknown;
|
23 | swipeDuration?: number;
|
24 | startPosition?: number;
|
25 | showIndicators?: boolean;
|
26 | closeOnPopstate?: boolean;
|
27 | closeIconPosition?: PopupCloseIconPosition;
|
28 | closeOnClickImage?: boolean;
|
29 | closeOnClickOverlay?: boolean;
|
30 | onClose?(): void;
|
31 | onScale?(args: {
|
32 | scale: number;
|
33 | index: number;
|
34 | }): void;
|
35 | onChange?(index: number): void;
|
36 | };
|
37 | export type ImagePreviewScaleEventParams = {
|
38 | scale: number;
|
39 | index: number;
|
40 | };
|
41 | type ImagePreviewItemExpose = {
|
42 | resetScale: () => void;
|
43 | };
|
44 | export type ImagePreviewItemInstance = ComponentPublicInstance<ImagePreviewItemProps, ImagePreviewItemExpose>;
|
45 | export type ImagePreviewExpose = {
|
46 | resetScale: () => void;
|
47 | swipeTo: (index: number, options?: SwipeToOptions) => void;
|
48 | };
|
49 | export type ImagePreviewInstance = ComponentPublicInstance<ImagePreviewProps, ImagePreviewExpose>;
|
50 | export type ImagePreviewThemeVars = {
|
51 | imagePreviewIndexTextColor?: string;
|
52 | imagePreviewIndexFontSize?: string;
|
53 | imagePreviewIndexLineHeight?: number | string;
|
54 | imagePreviewIndexTextShadow?: string;
|
55 | imagePreviewOverlayBackground?: string;
|
56 | imagePreviewCloseIconSize?: string;
|
57 | imagePreviewCloseIconColor?: string;
|
58 | imagePreviewCloseIconMargin?: string;
|
59 | imagePreviewCloseIconZIndex?: number | string;
|
60 | };
|
61 | export {};
|