mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +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;
|
||||
}
|
||||
|
||||
if (move) {
|
||||
if (move && active + move >= -1 && active + move <= count) {
|
||||
if (active === -1) {
|
||||
swipes[count - 1].offset = 0;
|
||||
}
|
||||
swipes[0].offset = atLast && move > 0 ? trackSize : 0;
|
||||
|
||||
this.active += move;
|
||||
} else {
|
||||
if (atFirst) {
|
||||
swipes[count - 1].offset = delta > 0 ? -trackSize : 0;
|
||||
} else if (atLast) {
|
||||
swipes[0].offset = delta < 0 ? trackSize : 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (atFirst) {
|
||||
swipes[count - 1].offset = delta > 0 || move < 0 ? -trackSize : 0;
|
||||
} else if (atLast) {
|
||||
swipes[0].offset = delta < 0 || move > 0 ? trackSize : 0;
|
||||
}
|
||||
|
||||
this.offset = offset - this.active * this.size;
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user