mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 11:54:02 +00:00
feat(ImagePreview): add swipeTo method (#6596)
This commit is contained in:
@@ -405,6 +405,14 @@ export default createComponent({
|
||||
onClosed() {
|
||||
this.$emit('closed');
|
||||
},
|
||||
|
||||
// @exposed-api
|
||||
swipeTo(index, options) {
|
||||
if (!this.$refs.swipe) {
|
||||
return;
|
||||
}
|
||||
this.$refs.swipe.swipeTo(+index, options);
|
||||
},
|
||||
},
|
||||
|
||||
render() {
|
||||
|
Reference in New Issue
Block a user