mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-24 23:49:14 +08:00
[bugfix] Swipe: multi finger (#1890)
This commit is contained in:
parent
bc34d5048b
commit
67b17e7ed2
@ -175,7 +175,7 @@ export default create({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onTouchMove(event) {
|
onTouchMove(event) {
|
||||||
if (!this.touchable) return;
|
if (!this.touchable || !this.swiping) return;
|
||||||
|
|
||||||
this.touchMove(event);
|
this.touchMove(event);
|
||||||
|
|
||||||
@ -190,14 +190,14 @@ export default create({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onTouchEnd() {
|
onTouchEnd() {
|
||||||
if (!this.touchable) return;
|
if (!this.touchable || !this.swiping) return;
|
||||||
|
|
||||||
if (this.delta) {
|
if (this.delta) {
|
||||||
const offset = this.vertical ? this.offsetY : this.offsetX;
|
const offset = this.vertical ? this.offsetY : this.offsetX;
|
||||||
this.move(offset > 50 ? (this.delta > 0 ? -1 : 1) : 0);
|
this.move(offset > 50 ? (this.delta > 0 ? -1 : 1) : 0);
|
||||||
this.swiping = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.swiping = false;
|
||||||
this.autoPlay();
|
this.autoPlay();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user