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

手机端图片移动问题 #313

Closed
happyyummy opened this issue Jan 8, 2024 · 7 comments
Closed

手机端图片移动问题 #313

happyyummy opened this issue Jan 8, 2024 · 7 comments

Comments

@happyyummy
Copy link

在手机端移动图片时,图片会切换成之前缩放过的比例

@mirari
Copy link
Owner

mirari commented Jan 8, 2024

viewerjs没有专门适配移动端,默认应该是没法拖动图片的
如果是自己实现了类似的需求,可以尝试关闭双击还原的配置项toggleondblclick
还有就是如果使用了指令方式,可以尝试加入static修饰符避免dom改变触发重载

@mirari
Copy link
Owner

mirari commented Jan 8, 2024

如果你指的是切换图片时的新图展示比例,这个默认就是初始值0.9
可以通过initialCoverage配置项修改

@happyyummy
Copy link
Author

in ./node_modules/v-viewer/dist/index.mjs

Module parse failed: Unexpected token (16:10)
You may need an appropriate loader to handle this file type.
现在又报这个错,应该安装什么loader呀

@mirari
Copy link
Owner

mirari commented Jan 8, 2024

需要提供环境信息,比如脚手架、v-viewer和vue的版本号

@happyyummy
Copy link
Author

"v-viewer": "^3.0.13", "viewerjs": "^1.11.6", "vue": "^2.5.2", "webpack": "^3.6.0",

@mirari
Copy link
Owner

mirari commented Jan 8, 2024

vue2需要安装legacy版本,不能使用3.x
pnpm i v-viewer@legacy

@happyyummy
Copy link
Author

谢谢大佬,移动端也可用!

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