feat(ImagePreview): add swipeTo method (#6596)

This commit is contained in:
来铧敏
2020-06-22 20:47:04 +08:00
committed by GitHub
parent 60fb4cc7bc
commit bd1279bc7d
6 changed files with 76 additions and 0 deletions

View File

@@ -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 {