-
-
Notifications
You must be signed in to change notification settings - Fork 597
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
@varlet/touch-emulator,在桌面端体验不友好 #114
Comments
pc文档右侧手机的部分就是通过这个包进行适配的结果,swipe的效果是你期望的效果么? |
方便的话能否提供一个问题demo,可以发到我的邮箱。 |
是要PC文档右侧手机部分的效果 |
您是mac电脑么 |
如果您是mac电脑,img标签的图像在拖动时会有默认行为,会导致您现在出现的问题,touchmove事件被默认行为打断了 以下是您给出的demo下面的代码 .swipe-item {
width: 100%;
height: 100%;
object-fit: cover;
加入这行代码
pointer-events: none;
} |
可以了,非常感谢 |
不用客气~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
安装@varlet/touch-emulator,并在main.js中导入:
import '@varlet/touch-emulator'
但是切换效果不理想:
希望效果:按住鼠标左键滑动时,切换
当前效果:按住鼠标左键滑动,然后松开,再次滑动才切换
The text was updated successfully, but these errors were encountered: