Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎样隐式的去调用图片查看 #44

Open
aLittlePursuit opened this issue Jun 28, 2018 · 3 comments
Open

怎样隐式的去调用图片查看 #44

aLittlePursuit opened this issue Jun 28, 2018 · 3 comments
Labels

Comments

@aLittlePursuit
Copy link

例如我只是展示一个button,当点击这个button时我去查看某一个图片,是没有这样一个方法去调用呢?

@LS1231 LS1231 added the feature label Jul 17, 2018
@LS1231
Copy link
Owner

LS1231 commented Jul 17, 2018

这个主意不错,后续会支持

@Notdefind
Copy link

看了大佬的源码,自己改了一下。 将openPhotoSwipe方法暴露出来,在外部通过ref拿到组件对象调用。
this.$refs['preview'].openPhotoSwipe(1, document.querySelectorAll('.my-gallery')[1], true, true);
可以实现点击按钮打开预览图片

@Notdefind
Copy link

希望后期能实现预览图片自适应,和预览图片轮播不可循环滑动

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants