[bugfix] ImagePreview: fix ts definition (#1767)
This commit is contained in:
Vendored
+7
-1
@@ -1,12 +1,18 @@
|
|||||||
import { VanPopupMixin } from './mixins/popup';
|
import { VanPopupMixin } from './mixins/popup';
|
||||||
|
|
||||||
|
export type ImagePreviewOptions = string[] | {
|
||||||
|
images: string[];
|
||||||
|
startPosition?: number;
|
||||||
|
onClose?: () => any;
|
||||||
|
};
|
||||||
|
|
||||||
export class VanImagePreview extends VanPopupMixin {
|
export class VanImagePreview extends VanPopupMixin {
|
||||||
images: string[];
|
images: string[];
|
||||||
startPosition: number;
|
startPosition: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ImagePreview {
|
export interface ImagePreview {
|
||||||
(images: string[], startPosition?: number): VanImagePreview;
|
(options: ImagePreviewOptions, startPosition?: number): VanImagePreview;
|
||||||
install(): void;
|
install(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user