From ae87341f456022d9ad83d3a5889dd9900887342e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AA=97=E4=BD=A0=E6=98=AF=E5=B0=8F=E7=8C=AB=E5=92=AA?= Date: Tue, 19 Mar 2019 15:52:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(tabs):=20=E4=BF=AE=E5=A4=8D=E5=8F=B3?= =?UTF-8?q?=E6=BB=91=E8=BF=94=E5=9B=9E=E4=B8=8A=E4=B8=80=E9=A1=B5=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E6=BB=91=E5=8A=A8=E9=A1=B5=E9=9D=A2=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 手势返回上一页的时候,判断下原点的位置,如果离屏幕左边的距离太近当做是滑动返回上一页 --- src/components/tabs/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/tabs/index.js b/src/components/tabs/index.js index 50cb3fb4a..bde92eda2 100644 --- a/src/components/tabs/index.js +++ b/src/components/tabs/index.js @@ -85,7 +85,7 @@ export default class AtTabs extends AtComponent { const moveDistance = touchMove - this._touchDot const maxIndex = tabList.length - if (!this._isMoving && this._interval < MAX_INTERVAL) { + if (!this._isMoving && this._interval < MAX_INTERVAL && this._touchDot > 20) { // 向左滑动 if (current + 1 < maxIndex && moveDistance <= -MIN_DISTANCE) { this._isMoving = true