[bug fix] Tabs: fix tab content not trigger click event (#749)

This commit is contained in:
张敏 2018-03-22 11:41:22 +08:00 committed by GitHub
parent 14d7f9dfb0
commit 4810630215
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,14 +162,12 @@ export default create({
// watch swipe touch move // watch swipe touch move
onTouchMove(event) { onTouchMove(event) {
event.preventDefault();
this.deltaX = event.touches[0].clientX - this.startX; this.deltaX = event.touches[0].clientX - this.startX;
this.direction = this.getDirection(event.touches[0]); this.direction = this.getDirection(event.touches[0]);
}, },
// watch swipe touch end // watch swipe touch end
onTouchEnd(event) { onTouchEnd() {
event.preventDefault();
const { direction, deltaX, curActive } = this; const { direction, deltaX, curActive } = this;
const minSwipeDistance = 50; const minSwipeDistance = 50;