fix(ImagePreview): long vertical images sliding up and down (#11702)

Co-authored-by: xuwenqiang <xuwenqiang@kanzhun.com>
This commit is contained in:
MrXwq 2023-03-25 09:15:15 +08:00 committed by GitHub
parent 3cc3c29853
commit d883591b91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -188,7 +188,8 @@ export default defineComponent({
// allow user to swipe to next image // allow user to swipe to next image
if ( if (
(moveX > maxMoveX.value || moveX < -maxMoveX.value) && (moveX > maxMoveX.value || moveX < -maxMoveX.value) &&
!isImageMoved !isImageMoved &&
touch.isHorizontal()
) { ) {
state.moving = false; state.moving = false;
return; return;