fix(Swipe): avoid resetting position on multi-finger touch (#11503)

This commit is contained in:
neverland 2023-01-22 20:24:09 +08:00 committed by GitHub
parent e75e680d9f
commit 9306db90ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -302,7 +302,12 @@ export default defineComponent({
let touchStartTime: number;
const onTouchStart = (event: TouchEvent) => {
if (!props.touchable) return;
if (
!props.touchable ||
// avoid resetting position on multi-finger touch
event.touches.length > 1
)
return;
touch.start(event);