antd-mobile 2.3.3 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * antd-mobile v2.3.3
3
+ * antd-mobile v2.3.4
4
4
  *
5
5
  * Copyright 2015-present, Alipay, Inc.
6
6
  * All rights reserved.
@@ -25412,7 +25412,23 @@ function doAlign(el, tgtRegion, align, isTgtRegionVisible) {
25412
25412
  // 1. 复原修改过的定位参数
25413
25413
 
25414
25414
  if (isStillFailX || isStillFailY) {
25415
- points = align.points;
25415
+ var _newPoints2 = points; // 重置对应部分的翻转逻辑
25416
+
25417
+ if (isStillFailX) {
25418
+ _newPoints2 = flip(points, /[lr]/gi, {
25419
+ l: 'r',
25420
+ r: 'l'
25421
+ });
25422
+ }
25423
+
25424
+ if (isStillFailY) {
25425
+ _newPoints2 = flip(points, /[tb]/gi, {
25426
+ t: 'b',
25427
+ b: 't'
25428
+ });
25429
+ }
25430
+
25431
+ points = _newPoints2;
25416
25432
  offset = align.offset || [0, 0];
25417
25433
  targetOffset = align.targetOffset || [0, 0];
25418
25434
  } // 2. 只有指定了可以调整当前方向才调整
@@ -26117,6 +26133,7 @@ var PullToRefresh = function (_React$Component2) {
26117
26133
  };
26118
26134
  _this2.onTouchStart = function (_ele, e) {
26119
26135
  _this2._ScreenY = _this2._startScreenY = e.touches[0].screenY;
26136
+ _this2._startScreenX = e.touches[0].screenX;
26120
26137
  // 一开始 refreshing 为 true 时 this._lastScreenY 有值
26121
26138
  _this2._lastScreenY = _this2._lastScreenY || 0;
26122
26139
  };
@@ -26150,9 +26167,14 @@ var PullToRefresh = function (_React$Component2) {
26150
26167
  _this2.onTouchMove = function (ele, e) {
26151
26168
  // 使用 pageY 对比有问题
26152
26169
  var _screenY = e.touches[0].screenY;
26170
+ var _screenX = e.touches[0].screenX;
26153
26171
  var direction = _this2.props.direction;
26154
- // 拖动方向不符合的不处理
26172
+ // 横向滑动不处理
26155
26173
 
26174
+ if (Math.abs(_screenX - _this2._startScreenX) > 20 * window.devicePixelRatio) {
26175
+ return;
26176
+ }
26177
+ // 拖动方向不符合的不处理
26156
26178
  if (direction === UP && _this2._startScreenY < _screenY || direction === DOWN && _this2._startScreenY > _screenY) {
26157
26179
  return;
26158
26180
  }