@arco-design/mobile-react 2.29.3 → 2.29.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.
Files changed (46) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/load-more/index.d.ts +6 -0
  5. package/cjs/load-more/index.js +9 -3
  6. package/cjs/picker/index.js +2 -9
  7. package/cjs/picker-view/components/cascader.d.ts +1 -0
  8. package/cjs/picker-view/components/cascader.js +8 -1
  9. package/cjs/picker-view/components/picker-cell.d.ts +1 -0
  10. package/cjs/picker-view/components/picker-cell.js +8 -1
  11. package/cjs/picker-view/index.js +15 -9
  12. package/cjs/search-bar/style/css/index.css +2 -0
  13. package/cjs/search-bar/style/index.less +93 -91
  14. package/cjs/tabs/index.js +4 -1
  15. package/dist/index.js +46 -23
  16. package/dist/index.min.js +2 -2
  17. package/dist/style.css +2 -0
  18. package/dist/style.min.css +1 -1
  19. package/esm/load-more/index.d.ts +6 -0
  20. package/esm/load-more/index.js +9 -3
  21. package/esm/picker/index.js +4 -10
  22. package/esm/picker-view/components/cascader.d.ts +1 -0
  23. package/esm/picker-view/components/cascader.js +8 -1
  24. package/esm/picker-view/components/picker-cell.d.ts +1 -0
  25. package/esm/picker-view/components/picker-cell.js +8 -1
  26. package/esm/picker-view/index.js +16 -10
  27. package/esm/search-bar/style/css/index.css +2 -0
  28. package/esm/search-bar/style/index.less +93 -91
  29. package/esm/tabs/index.js +4 -1
  30. package/package.json +3 -3
  31. package/tokens/app/arcodesign/default/css-variables.less +2 -0
  32. package/tokens/app/arcodesign/default/index.d.ts +2 -0
  33. package/tokens/app/arcodesign/default/index.js +2 -0
  34. package/tokens/app/arcodesign/default/index.json +24 -0
  35. package/tokens/app/arcodesign/default/index.less +2 -0
  36. package/umd/load-more/index.d.ts +6 -0
  37. package/umd/load-more/index.js +9 -3
  38. package/umd/picker/index.js +2 -9
  39. package/umd/picker-view/components/cascader.d.ts +1 -0
  40. package/umd/picker-view/components/cascader.js +8 -1
  41. package/umd/picker-view/components/picker-cell.d.ts +1 -0
  42. package/umd/picker-view/components/picker-cell.js +8 -1
  43. package/umd/picker-view/index.js +15 -9
  44. package/umd/search-bar/style/css/index.css +2 -0
  45. package/umd/search-bar/style/index.less +93 -91
  46. package/umd/tabs/index.js +4 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.29.4](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.29.3...@arco-design/mobile-react@2.29.4) (2023-09-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * `LoadMore` support the prop "getDataWhenNoScrollAtFirst" ([#170](https://github.com/arco-design/arco-design-mobile/issues/170)) ([7a4881d](https://github.com/arco-design/arco-design-mobile/commit/7a4881d92cb9fbb1a345240a2aaa940af0afbe63))
12
+ * `Picker` support default values when click confirm button ([c6f12ee](https://github.com/arco-design/arco-design-mobile/commit/c6f12ee54131235470c380c3bd59a22983247622))
13
+ * `SearchBar` adjust clear icon ([4f540fc](https://github.com/arco-design/arco-design-mobile/commit/4f540fcb255553fb59d0b972a74edf23a7224a16))
14
+ * `Tabs` prevent jumping when no touchmove event ([df01464](https://github.com/arco-design/arco-design-mobile/commit/df014640dc220af7f911fe1c2cb1e504c463a37b))
15
+
16
+
17
+
18
+
19
+
6
20
  ## [2.29.3](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.29.2...@arco-design/mobile-react@2.29.3) (2023-09-12)
7
21
 
8
22
 
package/README.en-US.md CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="_b
59
59
  React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">Click here</a>**
60
60
 
61
61
  ```
62
- <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.29.2/dist/style.min.css">
63
- <script src="https://unpkg.com/@arco-design/mobile-react@2.29.2/dist/index.min.js"></script>
62
+ <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.29.3/dist/style.min.css">
63
+ <script src="https://unpkg.com/@arco-design/mobile-react@2.29.3/dist/index.min.js"></script>
64
64
  ```
65
65
 
66
66
  ## Full import
package/README.md CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="
59
59
  React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">戳这里获取</a>**
60
60
 
61
61
  ```
62
- <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.29.2/dist/style.min.css">
63
- <script src="https://unpkg.com/@arco-design/mobile-react@2.29.2/dist/index.min.js"></script>
62
+ <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.29.3/dist/style.min.css">
63
+ <script src="https://unpkg.com/@arco-design/mobile-react@2.29.3/dist/index.min.js"></script>
64
64
  ```
65
65
 
66
66
  ## 引入全部
@@ -107,6 +107,12 @@ export interface LoadMoreProps {
107
107
  * @default true
108
108
  */
109
109
  getDataAtFirst?: boolean;
110
+ /**
111
+ * 当 getDataAtFirst === false 且数据不满一屏时是否触发一次请求,trigger=scroll时有效
112
+ * @en Whether to trigger a request when getDataAtFirst === false and the data is not full of one screen, valid when trigger=scroll
113
+ * @default false
114
+ */
115
+ getDataWhenNoScrollAtFirst?: boolean;
110
116
  /**
111
117
  * 状态改变时回调
112
118
  * @en Callback when state changes
@@ -55,7 +55,9 @@ var LoadMore = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
55
55
  blockWhenLoading = _props$blockWhenLoadi === void 0 ? true : _props$blockWhenLoadi,
56
56
  onStatusChange = props.onStatusChange,
57
57
  onClick = props.onClick,
58
- onEndReached = props.onEndReached;
58
+ onEndReached = props.onEndReached,
59
+ _props$getDataWhenNoS = props.getDataWhenNoScrollAtFirst,
60
+ getDataWhenNoScrollAtFirst = _props$getDataWhenNoS === void 0 ? false : _props$getDataWhenNoS;
59
61
  var domRef = (0, _react.useRef)(null);
60
62
  var requestAtFirst = trigger === 'scroll' ? getDataAtFirst : false;
61
63
 
@@ -100,10 +102,14 @@ var LoadMore = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
100
102
  }
101
103
  }, [nowStatus]);
102
104
  (0, _react.useEffect)(function () {
103
- if (requestAtFirst && !disabled) {
104
- if (statusRef.current === 'prepare') {
105
+ if (requestAtFirst) {
106
+ if (statusRef.current === 'prepare' && !disabled) {
105
107
  triggerGetData('requestAtFirst');
106
108
  }
109
+ } else {
110
+ if (trigger === 'scroll' && nowStatus === 'prepare' && checkNeedTrigger(0, threshold) && !disabled && getDataWhenNoScrollAtFirst) {
111
+ triggerGetData('pageEnd');
112
+ }
107
113
  }
108
114
  }, [trigger, disabled]);
109
115
  var handleContainerScroll = (0, _react.useCallback)(function () {
@@ -80,11 +80,7 @@ var Picker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
80
80
  _props$gestureOutOfCo = props.gestureOutOfControl,
81
81
  gestureOutOfControl = _props$gestureOutOfCo === void 0 ? true : _props$gestureOutOfCo,
82
82
  otherProps = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
83
-
84
- var _useState = (0, _react.useState)(value),
85
- scrollValue = _useState[0],
86
- setScrollValue = _useState[1];
87
-
83
+ var scrollValueRef = (0, _helpers.useLatestRef)(value);
88
84
  var domRef = (0, _react.useRef)(null);
89
85
  var pickerViewRef = (0, _react.useRef)(null);
90
86
  (0, _react.useImperativeHandle)(ref, function () {
@@ -135,7 +131,7 @@ var Picker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
135
131
  (0, _mobileUtils.nextTick)(function () {
136
132
  var _pickerViewRef$curren7;
137
133
 
138
- var val = ((_pickerViewRef$curren7 = pickerViewRef.current) == null ? void 0 : _pickerViewRef$curren7.getAllColumnValues()) || scrollValue || [];
134
+ var val = ((_pickerViewRef$curren7 = pickerViewRef.current) == null ? void 0 : _pickerViewRef$curren7.getAllColumnValues()) || scrollValueRef.current || [];
139
135
 
140
136
  if (onOk) {
141
137
  onOk(val);
@@ -151,9 +147,6 @@ var Picker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
151
147
  });
152
148
  };
153
149
 
154
- (0, _react.useEffect)(function () {
155
- setScrollValue(value);
156
- }, [value, setScrollValue]);
157
150
  (0, _helpers.useListenResize)(updateLayoutByVisible, [visible]); // 每次visible从false变为true时需要重新设置scrollValue的值为当前value的值(初始值)
158
151
 
159
152
  function updateLayoutByVisible() {
@@ -18,6 +18,7 @@ export interface CascaderProps {
18
18
  export interface CascaderRef {
19
19
  getCellMovingStatus: () => PickerCellMovingStatus[];
20
20
  scrollToCurrentIndex: () => void;
21
+ getAllCellsValue: () => ValueType[];
21
22
  }
22
23
  declare const Cascader: React.ForwardRefExoticComponent<CascaderProps & React.RefAttributes<CascaderRef>>;
23
24
  export default Cascader;
@@ -36,7 +36,8 @@ var Cascader = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
36
36
  (0, _react.useImperativeHandle)(ref, function () {
37
37
  return {
38
38
  getCellMovingStatus: getCellMovingStatus,
39
- scrollToCurrentIndex: scrollToCurrentIndex
39
+ scrollToCurrentIndex: scrollToCurrentIndex,
40
+ getAllCellsValue: getAllCellsValue
40
41
  };
41
42
  });
42
43
 
@@ -52,6 +53,12 @@ var Cascader = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
52
53
  });
53
54
  }
54
55
 
56
+ function getAllCellsValue() {
57
+ return pickerCellsRef.current.map(function (cell) {
58
+ return cell.getCurrentCellValue();
59
+ });
60
+ }
61
+
55
62
  function _onValueChange(value, index, newData) {
56
63
  var children = (0, _mobileUtils.arrayTreeFilter)(data, function (item, level) {
57
64
  return level <= index && item.value === value[level];
@@ -21,6 +21,7 @@ export interface PickerCellProps {
21
21
  export interface PickerCellRef {
22
22
  movingStatus: PickerCellMovingStatus;
23
23
  scrollToCurrentIndex: () => void;
24
+ getCurrentCellValue: () => ValueType;
24
25
  }
25
26
  declare const PickerCell: React.ForwardRefExoticComponent<PickerCellProps & React.RefAttributes<PickerCellRef>>;
26
27
  export default PickerCell;
@@ -298,6 +298,12 @@ var PickerCell = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
298
298
  _scrollToIndexWithChange(nowIndex, 0);
299
299
  }
300
300
 
301
+ function getCurrentCellValue() {
302
+ var _data$currentIndex;
303
+
304
+ return currentValue || ((_data$currentIndex = data[currentIndex]) == null ? void 0 : _data$currentIndex.value);
305
+ }
306
+
301
307
  function _clearTimer() {
302
308
  timeRef.current && clearTimeout(timeRef.current);
303
309
  timeRef.current = null;
@@ -362,7 +368,8 @@ var PickerCell = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
362
368
  (0, _react.useImperativeHandle)(ref, function () {
363
369
  return {
364
370
  movingStatus: movingStatusRef.current,
365
- scrollToCurrentIndex: scrollToCurrentIndex
371
+ scrollToCurrentIndex: scrollToCurrentIndex,
372
+ getCurrentCellValue: getCurrentCellValue
366
373
  };
367
374
  });
368
375
  return !hideEmptyCols || data && data.length ? /*#__PURE__*/_react.default.createElement("div", {
@@ -82,7 +82,6 @@ var PickerView = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
82
82
  var wrapperRef = (0, _react.useRef)(null);
83
83
  var domRef = (0, _react.useRef)(null);
84
84
  var barRef = (0, _react.useRef)(null);
85
- var scrollValueRef = (0, _helpers.useLatestRef)(scrollValue);
86
85
  var pickerCellsRef = (0, _react.useRef)([]);
87
86
  var cascaderRef = (0, _react.useRef)(null); // itemStyle height 同时对 selection-bar 生效,这里不单独抛出 selection-bar 的高度设置属性
88
87
  // @en The height of itemStyle applies to the selection-bar as well, without separately exposing the height setting property for the selection-bar.
@@ -124,32 +123,39 @@ var PickerView = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
124
123
  }, [data]);
125
124
 
126
125
  var getAllColumnValues = function getAllColumnValues() {
127
- return scrollValueRef.current || [];
126
+ var _cascaderRef$current;
127
+
128
+ var curValues = cascade ? ((_cascaderRef$current = cascaderRef.current) == null ? void 0 : _cascaderRef$current.getAllCellsValue()) || [] : pickerCellsRef.current.map(function (cell) {
129
+ return cell.getCurrentCellValue();
130
+ }); // 移除级联带来的空列值,理论上非首尾列不会有空值
131
+ // @en Remove empty values from cascader
132
+
133
+ return curValues.filter(function (v) {
134
+ return v;
135
+ });
128
136
  };
129
137
 
130
138
  function getColumnValue(index) {
131
- var _scrollValueRef$curre;
132
-
133
139
  if (index === void 0) {
134
140
  index = 0;
135
141
  }
136
142
 
137
- return (_scrollValueRef$curre = scrollValueRef.current) == null ? void 0 : _scrollValueRef$curre[index];
143
+ return getAllColumnValues()[index];
138
144
  }
139
145
 
140
146
  function getCellMovingStatus() {
141
- var _cascaderRef$current;
147
+ var _cascaderRef$current2;
142
148
 
143
- return cascade ? ((_cascaderRef$current = cascaderRef.current) == null ? void 0 : _cascaderRef$current.getCellMovingStatus()) || [] : pickerCellsRef.current.map(function (cell) {
149
+ return cascade ? ((_cascaderRef$current2 = cascaderRef.current) == null ? void 0 : _cascaderRef$current2.getCellMovingStatus()) || [] : pickerCellsRef.current.map(function (cell) {
144
150
  return cell.movingStatus;
145
151
  });
146
152
  }
147
153
 
148
154
  function scrollToCurrentIndex() {
149
155
  if (cascade) {
150
- var _cascaderRef$current2;
156
+ var _cascaderRef$current3;
151
157
 
152
- (_cascaderRef$current2 = cascaderRef.current) == null ? void 0 : _cascaderRef$current2.scrollToCurrentIndex();
158
+ (_cascaderRef$current3 = cascaderRef.current) == null ? void 0 : _cascaderRef$current3.scrollToCurrentIndex();
153
159
  return;
154
160
  }
155
161
 
@@ -75,6 +75,8 @@
75
75
  }
76
76
  .arco-search-bar-clear {
77
77
  color: #C9CDD4 ;
78
+ font-size: 16PX ;
79
+ padding-left: 0.32rem ;
78
80
  }
79
81
  .arco-search-bar-search-icon {
80
82
  color: #86909C ;
@@ -1,112 +1,114 @@
1
1
  @import '../../../style/mixin.less';
2
2
 
3
3
  .@{prefix}-search-bar {
4
- &-container {
5
- display: flex;
6
- align-items: center;
7
- position: relative;
8
- .use-var(padding, search-bar-padding);
9
- .use-var(background-color, search-bar-background-color);
10
- }
11
- &-square {
12
- .@{prefix}-search-bar-wrap {
13
- .use-var(border-radius, search-bar-square-shape-border-radius);
4
+ &-container {
5
+ display: flex;
6
+ align-items: center;
7
+ position: relative;
8
+ .use-var(padding, search-bar-padding);
9
+ .use-var(background-color, search-bar-background-color);
14
10
  }
15
- }
16
- &-round {
17
- .@{prefix}-search-bar-wrap {
18
- .use-var(border-radius, search-bar-round-shape-border-radius);
11
+ &-square {
12
+ .@{prefix}-search-bar-wrap {
13
+ .use-var(border-radius, search-bar-square-shape-border-radius);
14
+ }
19
15
  }
20
- }
21
- &-wrap {
22
- display: flex;
23
- align-items: center;
24
- flex: 1;
25
- .use-var(height, search-bar-input-wrapper-height);
26
- .use-var(font-size, search-bar-input-wrapper-font-size);
27
- .use-var(padding, search-bar-input-wrapper-padding);
28
- .use-var(background-color, search-bar-input-wrapper-background-color);
29
- }
30
- &-input {
31
- flex: 1;
32
- background-color: transparent;
33
- .use-var(height, search-bar-input-height);
34
- .use-var(caret-color, search-bar-input-caret-color);
35
- &-left {
36
- text-align: left;
16
+ &-round {
17
+ .@{prefix}-search-bar-wrap {
18
+ .use-var(border-radius, search-bar-round-shape-border-radius);
19
+ }
37
20
  }
38
- &-right {
39
- text-align: right;
40
- }
41
- &-center {
42
- text-align: center;
21
+ &-wrap {
22
+ display: flex;
23
+ align-items: center;
24
+ flex: 1;
25
+ .use-var(height, search-bar-input-wrapper-height);
26
+ .use-var(font-size, search-bar-input-wrapper-font-size);
27
+ .use-var(padding, search-bar-input-wrapper-padding);
28
+ .use-var(background-color, search-bar-input-wrapper-background-color);
43
29
  }
30
+ &-input {
31
+ flex: 1;
32
+ background-color: transparent;
33
+ .use-var(height, search-bar-input-height);
34
+ .use-var(caret-color, search-bar-input-caret-color);
35
+ &-left {
36
+ text-align: left;
37
+ }
38
+ &-right {
39
+ text-align: right;
40
+ }
41
+ &-center {
42
+ text-align: center;
43
+ }
44
+
45
+ &::placeholder {
46
+ .use-var(color, search-bar-input-placeholder-color);
47
+ }
44
48
 
45
- &::placeholder {
46
- .use-var(color, search-bar-input-placeholder-color);
49
+ &::-webkit-search-decoration,
50
+ &::-webkit-search-cancel-button {
51
+ display: none;
52
+ }
47
53
  }
48
54
 
49
- &::-webkit-search-decoration,
50
- &::-webkit-search-cancel-button {
51
- display: none;
55
+ &-prefix,
56
+ &-suffix,
57
+ &-clear {
58
+ align-items: center;
59
+ justify-content: center;
60
+ display: flex;
52
61
  }
53
- }
54
62
 
55
- &-prefix,
56
- &-suffix,
57
- &-clear {
58
- align-items: center;
59
- justify-content: center;
60
- display: flex;
61
- }
63
+ &-prefix {
64
+ .use-var(margin-right, search-bar-prefix-margin-right);
65
+ }
62
66
 
63
- &-prefix {
64
- .use-var(margin-right, search-bar-prefix-margin-right);
65
- }
67
+ &-clear {
68
+ .use-var(color, search-bar-clear-icon-color);
69
+ .use-var(font-size, search-bar-clear-icon-font-size);
70
+ .use-var(padding-left, search-bar-clear-icon-padding-left);
71
+ }
66
72
 
67
- &-clear {
68
- .use-var(color, search-bar-clear-icon-color);
69
- }
73
+ &-search-icon {
74
+ .use-var(color, search-bar-search-icon-color);
75
+ .use-var(font-size, search-bar-search-icon-font-size);
76
+ }
70
77
 
71
- &-search-icon {
72
- .use-var(color, search-bar-search-icon-color);
73
- .use-var(font-size, search-bar-search-icon-font-size);
74
- }
78
+ &-cancel-btn {
79
+ .use-var(margin-left, search-bar-cancel-btn-margin-left);
80
+ .use-var(color, search-bar-cancel-btn-color);
81
+ .use-var(font-size, search-bar-cancel-btn-font-size);
82
+ }
75
83
 
76
- &-cancel-btn {
77
- .use-var(margin-left, search-bar-cancel-btn-margin-left);
78
- .use-var(color, search-bar-cancel-btn-color);
79
- .use-var(font-size, search-bar-cancel-btn-font-size);
80
- }
84
+ &-association {
85
+ position: absolute;
86
+ left: 0;
87
+ right: 0;
88
+ .use-var(background-color, search-bar-association-background-color);
89
+ top: 100%;
90
+ display: none;
81
91
 
82
- &-association {
83
- position: absolute;
84
- left: 0;
85
- right: 0;
86
- .use-var(background-color, search-bar-association-background-color);
87
- top: 100%;
88
- display: none;
92
+ &-visible {
93
+ display: block;
94
+ }
89
95
 
90
- &-visible {
91
- display: block;
92
- }
96
+ &-item {
97
+ .use-var(height, search-bar-association-item-height);
98
+ display: flex;
99
+ align-items: center;
100
+ position: relative;
101
+ .use-var(color, search-bar-association-item-color);
102
+ .use-var(padding, search-bar-association-item-padding);
103
+ .use-var(font-size, search-bar-association-item-font-size);
93
104
 
94
- &-item {
95
- .use-var(height, search-bar-association-item-height);
96
- display: flex;
97
- align-items: center;
98
- position: relative;
99
- .use-var(color, search-bar-association-item-color);
100
- .use-var(padding, search-bar-association-item-padding);
101
- .use-var(font-size, search-bar-association-item-font-size);
102
-
103
- &:not(:last-child) {
104
- .onepx-border-var(bottom, line-color);
105
- }
105
+ &:not(:last-child) {
106
+ .onepx-border-var(bottom, line-color);
107
+ }
106
108
 
107
- &-highlight {
108
- .use-var(color, search-bar-association-item-highlight-color)
109
- }
109
+ &-highlight {
110
+ .use-var(color, search-bar-association-item-highlight-color)
111
+ }
112
+ }
110
113
  }
111
- }
112
- }
114
+ }
package/cjs/tabs/index.js CHANGED
@@ -197,6 +197,7 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
197
197
  var touchStartXRef = (0, _react.useRef)(0);
198
198
  var touchStartYRef = (0, _react.useRef)(0);
199
199
  var touchStartTimeRef = (0, _react.useRef)(0);
200
+ var touchMovedRef = (0, _react.useRef)(false);
200
201
  var scrollingRef = (0, _react.useRef)(null);
201
202
  var touchStoppedRef = (0, _react.useRef)(false);
202
203
  var changeFromRef = (0, _react.useRef)('');
@@ -290,6 +291,7 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
290
291
  }
291
292
 
292
293
  touchStartedRef.current = true;
294
+ touchMovedRef.current = false;
293
295
  setCellTrans(false);
294
296
  setPaneTrans(false);
295
297
  var evt = e.touches[0];
@@ -317,6 +319,7 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
317
319
  return;
318
320
  }
319
321
 
322
+ touchMovedRef.current = true;
320
323
  var evt = e.changedTouches[0];
321
324
  var touchMoveX = evt.clientX || 0;
322
325
  var touchMoveY = evt.clientY || 0; // bugfix: 兼容safari在右滑返回上一页时clientX为负值的情况,安卓有折叠屏,触点会有超出屏幕(clientX < 0)的情况,因此这里限定ios系统
@@ -383,7 +386,7 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
383
386
  cellRef.current && cellRef.current.scrollToCenter();
384
387
  }
385
388
 
386
- if (!touchStartedRef.current || posAdjustingRef.current || scrollingRef.current) {
389
+ if (!touchStartedRef.current || posAdjustingRef.current || scrollingRef.current || !touchMovedRef.current) {
387
390
  return;
388
391
  }
389
392