From f884780d9284aebd8889376f9bad40758a6892c8 Mon Sep 17 00:00:00 2001 From: SugarTiger <1029109173@qq.com> Date: Fri, 25 May 2018 10:45:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?loadmore=E7=BB=84=E4=BB=B6=E7=9A=84translat?= =?UTF-8?q?e=E8=AE=A1=E7=AE=97=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/loadmore/src/loadmore.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/loadmore/src/loadmore.vue b/packages/loadmore/src/loadmore.vue index 431b7318..aaab9259 100644 --- a/packages/loadmore/src/loadmore.vue +++ b/packages/loadmore/src/loadmore.vue @@ -291,16 +291,16 @@ return; } this.currentY = event.touches[0].clientY; - let distance = (this.currentY - this.startY) / this.distanceIndex; + let distance = this.currentY - this.startY; this.direction = distance > 0 ? 'down' : 'up'; if (typeof this.topMethod === 'function' && this.direction === 'down' && this.getScrollTop(this.scrollEventTarget) === 0 && this.topStatus !== 'loading') { event.preventDefault(); event.stopPropagation(); if (this.maxDistance > 0) { - this.translate = distance <= this.maxDistance ? distance - this.startScrollTop : this.translate; + this.translate = distance <= this.maxDistance ? (distance - this.startScrollTop) / this.distanceIndex : this.translate; } else { - this.translate = distance - this.startScrollTop; + this.translate = (distance - this.startScrollTop) / this.distanceIndex; } if (this.translate < 0) { this.translate = 0; @@ -317,9 +317,9 @@ event.stopPropagation(); if (this.maxDistance > 0) { this.translate = Math.abs(distance) <= this.maxDistance - ? this.getScrollTop(this.scrollEventTarget) - this.startScrollTop + distance : this.translate; + ? (this.getScrollTop(this.scrollEventTarget) - this.startScrollTop + distance ) / this.distanceIndex: this.translate; } else { - this.translate = this.getScrollTop(this.scrollEventTarget) - this.startScrollTop + distance; + this.translate = (this.getScrollTop(this.scrollEventTarget) - this.startScrollTop + distance) / this.distanceIndex; } if (this.translate > 0) { this.translate = 0; From 8d53abc5fb40ec194c9364f915c448353f1e6345 Mon Sep 17 00:00:00 2001 From: SugarTiger <1029109173@qq.com> Date: Fri, 25 May 2018 11:29:21 +0800 Subject: [PATCH 2/2] =?UTF-8?q?tab-container=E7=BB=84=E4=BB=B6=E7=9A=84mou?= =?UTF-8?q?se=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/tab-container/src/tab-container.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/tab-container/src/tab-container.vue b/packages/tab-container/src/tab-container.vue index cf141430..cd7e3bb8 100644 --- a/packages/tab-container/src/tab-container.vue +++ b/packages/tab-container/src/tab-container.vue @@ -3,8 +3,6 @@ @touchstart="startDrag" @mousedown="startDrag" @touchmove="onDrag" - @mousemove="onDrag" - @mouseup="endDrag" @touchend="endDrag" class="mint-tab-container">