mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 09:24:25 +00:00
feat(ImagePreview): add swipeTo method (#6596)
This commit is contained in:
2
types/image-preview.d.ts
vendored
2
types/image-preview.d.ts
vendored
@@ -1,5 +1,6 @@
|
||||
import { VanComponent } from './component';
|
||||
import { VanPopupMixin } from './mixins/popup';
|
||||
import { SwipeToOptions } from './swipe';
|
||||
|
||||
export type ImagePreviewOptions =
|
||||
| string[]
|
||||
@@ -21,6 +22,7 @@ export type ImagePreviewOptions =
|
||||
getContainer?: string | (() => Element);
|
||||
onClose?: () => void;
|
||||
onChange?: (index: number) => void;
|
||||
swipeTo(index: number, options?: SwipeToOptions): void;
|
||||
};
|
||||
|
||||
export class VanImagePreview extends VanPopupMixin {
|
||||
|
Reference in New Issue
Block a user