chore(ImagePreview): fix demo error

This commit is contained in:
chenjiahan
2020-06-22 20:52:58 +08:00
parent bd1279bc7d
commit 489dde2114
2 changed files with 2 additions and 46 deletions

View File

@@ -408,10 +408,9 @@ export default createComponent({
// @exposed-api
swipeTo(index, options) {
if (!this.$refs.swipe) {
return;
if (this.$refs.swipe) {
this.$refs.swipe.swipeTo(index, options);
}
this.$refs.swipe.swipeTo(+index, options);
},
},