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

预览图片的左右两侧希望能增加上下翻页的操作 #358

Open
1129zaj opened this issue Dec 30, 2024 · 1 comment
Open

预览图片的左右两侧希望能增加上下翻页的操作 #358

1129zaj opened this issue Dec 30, 2024 · 1 comment

Comments

@1129zaj
Copy link

1129zaj commented Dec 30, 2024

image
@mirari
Copy link
Owner

mirari commented Dec 30, 2024

viewerjs不太适合界面有高度定制需求的场景。恐怕只能在view事件里自己通过脚本往上加了,用vue实现并用脚本挪上去也不复杂,但viewerjs原生是不会支持了,毕竟底部也有按钮。

大致思路是:

  1. 用vue的语法来实现翻页按钮,并隐藏在一个指定id(如viewer-btn)的元素下,设置元素不可见
  2. 在view事件回调里,获取该元素,并用querySelector找到viewerjs弹出窗口作为父元素,把它挪进去

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

No branches or pull requests

2 participants