mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-23 18:00:27 +08:00
[bugfix] Swipe: multi finger touch (#1478)
This commit is contained in:
parent
231dbb5f8b
commit
3d573672b6
@ -203,20 +203,21 @@ export default create({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (move) {
|
if (move && active + move >= -1 && active + move <= count) {
|
||||||
if (active === -1) {
|
if (active === -1) {
|
||||||
swipes[count - 1].offset = 0;
|
swipes[count - 1].offset = 0;
|
||||||
}
|
}
|
||||||
swipes[0].offset = atLast && move > 0 ? trackSize : 0;
|
swipes[0].offset = atLast && move > 0 ? trackSize : 0;
|
||||||
|
|
||||||
this.active += move;
|
this.active += move;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
if (atFirst) {
|
if (atFirst) {
|
||||||
swipes[count - 1].offset = delta > 0 ? -trackSize : 0;
|
swipes[count - 1].offset = delta > 0 || move < 0 ? -trackSize : 0;
|
||||||
} else if (atLast) {
|
} else if (atLast) {
|
||||||
swipes[0].offset = delta < 0 ? trackSize : 0;
|
swipes[0].offset = delta < 0 || move > 0 ? trackSize : 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.offset = offset - this.active * this.size;
|
this.offset = offset - this.active * this.size;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user