@arco-design/mobile-react 2.29.3 → 2.29.5

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 (100) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/action-sheet/index.d.ts +2 -2
  5. package/cjs/dialog/index.d.ts +2 -2
  6. package/cjs/image-picker/index.js +14 -6
  7. package/cjs/image-preview/index.d.ts +2 -2
  8. package/cjs/image-preview/index.js +5 -3
  9. package/cjs/index.d.ts +5 -5
  10. package/cjs/index.js +16 -16
  11. package/cjs/load-more/index.d.ts +11 -0
  12. package/cjs/load-more/index.js +18 -4
  13. package/cjs/masking/index.d.ts +2 -2
  14. package/cjs/picker/index.js +2 -9
  15. package/cjs/picker-view/components/cascader.d.ts +1 -0
  16. package/cjs/picker-view/components/cascader.js +8 -1
  17. package/cjs/picker-view/components/picker-cell.d.ts +1 -0
  18. package/cjs/picker-view/components/picker-cell.js +8 -1
  19. package/cjs/picker-view/index.js +15 -9
  20. package/cjs/popup/index.d.ts +2 -2
  21. package/cjs/popup-swiper/index.d.ts +2 -2
  22. package/cjs/pull-refresh/android-pull-refresh.js +12 -20
  23. package/cjs/pull-refresh/hooks.js +2 -2
  24. package/cjs/pull-refresh/style/css/index.css +0 -1
  25. package/cjs/pull-refresh/style/index.less +0 -1
  26. package/cjs/search-bar/style/css/index.css +2 -0
  27. package/cjs/search-bar/style/index.less +93 -91
  28. package/cjs/style.d.ts +5 -5
  29. package/cjs/style.js +8 -8
  30. package/cjs/tabs/index.js +4 -1
  31. package/cjs/tabs/tab-pane.js +5 -2
  32. package/cjs/toast/index.d.ts +12 -12
  33. package/dist/index.js +2454 -2419
  34. package/dist/index.min.js +5 -5
  35. package/dist/style.css +505 -504
  36. package/dist/style.min.css +1 -1
  37. package/esm/action-sheet/index.d.ts +2 -2
  38. package/esm/dialog/index.d.ts +2 -2
  39. package/esm/image-picker/index.js +13 -6
  40. package/esm/image-preview/index.d.ts +2 -2
  41. package/esm/image-preview/index.js +5 -3
  42. package/esm/index.d.ts +5 -5
  43. package/esm/index.js +5 -5
  44. package/esm/load-more/index.d.ts +11 -0
  45. package/esm/load-more/index.js +18 -4
  46. package/esm/masking/index.d.ts +2 -2
  47. package/esm/picker/index.js +4 -10
  48. package/esm/picker-view/components/cascader.d.ts +1 -0
  49. package/esm/picker-view/components/cascader.js +8 -1
  50. package/esm/picker-view/components/picker-cell.d.ts +1 -0
  51. package/esm/picker-view/components/picker-cell.js +8 -1
  52. package/esm/picker-view/index.js +16 -10
  53. package/esm/popup/index.d.ts +2 -2
  54. package/esm/popup-swiper/index.d.ts +2 -2
  55. package/esm/pull-refresh/android-pull-refresh.js +13 -22
  56. package/esm/pull-refresh/hooks.js +2 -2
  57. package/esm/pull-refresh/style/css/index.css +0 -1
  58. package/esm/pull-refresh/style/index.less +0 -1
  59. package/esm/search-bar/style/css/index.css +2 -0
  60. package/esm/search-bar/style/index.less +93 -91
  61. package/esm/style.d.ts +5 -5
  62. package/esm/style.js +5 -5
  63. package/esm/tabs/index.js +4 -1
  64. package/esm/tabs/tab-pane.js +6 -3
  65. package/esm/toast/index.d.ts +12 -12
  66. package/package.json +3 -3
  67. package/tokens/app/arcodesign/default/css-variables.less +2 -0
  68. package/tokens/app/arcodesign/default/index.d.ts +2 -0
  69. package/tokens/app/arcodesign/default/index.js +2 -0
  70. package/tokens/app/arcodesign/default/index.json +24 -0
  71. package/tokens/app/arcodesign/default/index.less +2 -0
  72. package/umd/action-sheet/index.d.ts +2 -2
  73. package/umd/dialog/index.d.ts +2 -2
  74. package/umd/image-picker/index.js +16 -10
  75. package/umd/image-preview/index.d.ts +2 -2
  76. package/umd/image-preview/index.js +5 -3
  77. package/umd/index.d.ts +5 -5
  78. package/umd/index.js +14 -14
  79. package/umd/load-more/index.d.ts +11 -0
  80. package/umd/load-more/index.js +18 -4
  81. package/umd/masking/index.d.ts +2 -2
  82. package/umd/picker/index.js +2 -9
  83. package/umd/picker-view/components/cascader.d.ts +1 -0
  84. package/umd/picker-view/components/cascader.js +8 -1
  85. package/umd/picker-view/components/picker-cell.d.ts +1 -0
  86. package/umd/picker-view/components/picker-cell.js +8 -1
  87. package/umd/picker-view/index.js +15 -9
  88. package/umd/popup/index.d.ts +2 -2
  89. package/umd/popup-swiper/index.d.ts +2 -2
  90. package/umd/pull-refresh/android-pull-refresh.js +15 -24
  91. package/umd/pull-refresh/hooks.js +2 -2
  92. package/umd/pull-refresh/style/css/index.css +0 -1
  93. package/umd/pull-refresh/style/index.less +0 -1
  94. package/umd/search-bar/style/css/index.css +2 -0
  95. package/umd/search-bar/style/index.less +93 -91
  96. package/umd/style.d.ts +5 -5
  97. package/umd/style.js +2 -2
  98. package/umd/tabs/index.js +4 -1
  99. package/umd/tabs/tab-pane.js +5 -2
  100. package/umd/toast/index.d.ts +12 -12
package/CHANGELOG.md CHANGED
@@ -3,6 +3,35 @@
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.5](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.29.4...@arco-design/mobile-react@2.29.5) (2023-10-07)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * `ImagePicker` the image will show up again if deleted when uploading ([#182](https://github.com/arco-design/arco-design-mobile/issues/182)) ([f26512a](https://github.com/arco-design/arco-design-mobile/commit/f26512a165e3c8ca082f716a64bdc8e7e86517b7))
12
+ * `ImagePreview` refresh problem when onload of multiple pictures is triggered at the same time ([#173](https://github.com/arco-design/arco-design-mobile/issues/173)) ([c71c526](https://github.com/arco-design/arco-design-mobile/commit/c71c526e81a2851df6653682bfad9b9b84704462))
13
+ * `LoadMore` support "getDataWithEndReachCheck" ([#180](https://github.com/arco-design/arco-design-mobile/issues/180)) ([25baa3c](https://github.com/arco-design/arco-design-mobile/commit/25baa3cae665edb7fa4f316d80886f497c38f7a3))
14
+ * `PullRefresh` optimize transform performance & fix decimal point deviation in ifShouldHandle ([#179](https://github.com/arco-design/arco-design-mobile/issues/179)) ([a826ed2](https://github.com/arco-design/arco-design-mobile/commit/a826ed26096cec3a6487d2bd58345113a5d17dfd))
15
+ * `Tabs` scroll offset in ssr when defaultActiveTab is greater than 0 ([#175](https://github.com/arco-design/arco-design-mobile/issues/175)) ([98aa1d7](https://github.com/arco-design/arco-design-mobile/commit/98aa1d7c5abe8851778f2aa5c2308fe807d5e4d9))
16
+
17
+
18
+
19
+
20
+
21
+ ## [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)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * `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))
27
+ * `Picker` support default values when click confirm button ([c6f12ee](https://github.com/arco-design/arco-design-mobile/commit/c6f12ee54131235470c380c3bd59a22983247622))
28
+ * `SearchBar` adjust clear icon ([4f540fc](https://github.com/arco-design/arco-design-mobile/commit/4f540fcb255553fb59d0b972a74edf23a7224a16))
29
+ * `Tabs` prevent jumping when no touchmove event ([df01464](https://github.com/arco-design/arco-design-mobile/commit/df014640dc220af7f911fe1c2cb1e504c463a37b))
30
+
31
+
32
+
33
+
34
+
6
35
  ## [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
36
 
8
37
 
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.4/dist/style.min.css">
63
+ <script src="https://unpkg.com/@arco-design/mobile-react@2.29.4/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.4/dist/style.min.css">
63
+ <script src="https://unpkg.com/@arco-design/mobile-react@2.29.4/dist/index.min.js"></script>
64
64
  ```
65
65
 
66
66
  ## 引入全部
@@ -86,11 +86,11 @@ declare const _default: React.ForwardRefExoticComponent<ActionSheetProps & React
86
86
  * @param {ActionSheetProps} config setting
87
87
  * @returns {{ close: () => void; update: (newConfig: ActionSheetProps) => void; }}
88
88
  */
89
- open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "items" | "cancelText" | "subTitle"> & {
89
+ open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "items" | "cancelText" | "subTitle"> & {
90
90
  key?: string | undefined;
91
91
  }, context?: import("../context-provider").GlobalContextParams | undefined) => {
92
92
  close: () => void;
93
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "items" | "cancelText" | "subTitle"> & {
93
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "items" | "cancelText" | "subTitle"> & {
94
94
  key?: string | undefined;
95
95
  }) => void;
96
96
  };
@@ -193,11 +193,11 @@ declare const _default: React.ForwardRefExoticComponent<DialogProps & React.RefA
193
193
  * @param {DialogProps} config Configuration
194
194
  * @returns {{ close: () => void; update: (newConfig: DialogProps) => void; }}
195
195
  */
196
- open: (config: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "extra"> & {
196
+ open: (config: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "extra"> & {
197
197
  key?: string | undefined;
198
198
  }, context?: import("../context-provider").GlobalContextParams | undefined) => {
199
199
  close: () => void;
200
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "extra"> & {
200
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "extra"> & {
201
201
  key?: string | undefined;
202
202
  }) => void;
203
203
  };
@@ -24,6 +24,8 @@ var _grid = _interopRequireDefault(require("../grid"));
24
24
 
25
25
  var _addIcon = _interopRequireDefault(require("./add-icon"));
26
26
 
27
+ var _helpers = require("../_helpers");
28
+
27
29
  var _type = require("./type");
28
30
 
29
31
  Object.keys(_type).forEach(function (key) {
@@ -81,7 +83,7 @@ var ImagePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
81
83
  onDeleteClick = props.onDeleteClick;
82
84
  var domRef = (0, _react.useRef)(null);
83
85
  var fileRef = (0, _react.useRef)(null);
84
- var cacheRef = (0, _react.useRef)([]);
86
+ var cacheRef = (0, _helpers.useLatestRef)(images);
85
87
  (0, _react.useImperativeHandle)(ref, function () {
86
88
  return {
87
89
  dom: domRef.current
@@ -148,7 +150,7 @@ var ImagePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
148
150
  file: files[index]
149
151
  };
150
152
  });
151
- cacheRef.current = [].concat(images, res);
153
+ cacheRef.current = [].concat(cacheRef.current, res);
152
154
  onChange([].concat(cacheRef.current)); // 执行upload
153
155
 
154
156
  if (typeof upload === 'function') {
@@ -161,15 +163,21 @@ var ImagePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
161
163
  var file = _ref2.file;
162
164
  return file === _file;
163
165
  });
164
- cacheRef.current[index] = (0, _extends2.default)({}, cacheRef.current[index], data, {
165
- status: undefined
166
- });
166
+
167
+ if (index !== -1) {
168
+ cacheRef.current[index] = (0, _extends2.default)({}, cacheRef.current[index], data, {
169
+ status: undefined
170
+ });
171
+ }
167
172
  }).catch(function () {
168
173
  var index = cacheRef.current.findIndex(function (_ref3) {
169
174
  var file = _ref3.file;
170
175
  return file === _file;
171
176
  });
172
- cacheRef.current[index].status = 'error';
177
+
178
+ if (index !== -1) {
179
+ cacheRef.current[index].status = 'error';
180
+ }
173
181
  }).finally(function () {
174
182
  onChange([].concat(cacheRef.current));
175
183
  });
@@ -274,9 +274,9 @@ declare const _default: React.ForwardRefExoticComponent<ImagePreviewProps & Reac
274
274
  * @param {ImagePreviewProps} config configuration
275
275
  * @returns {{ close: () => void; update: (newConfig: ImagePreviewProps) => void; }}
276
276
  */
277
- open: (config: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "loadingArea" | "onClose" | "fit" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "extra" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
277
+ open: (config: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "onClose" | "fit" | "loadingArea" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "extra" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
278
278
  close: () => void;
279
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "loadingArea" | "onClose" | "fit" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "extra" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">) => void;
279
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "onClose" | "fit" | "loadingArea" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "extra" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">) => void;
280
280
  };
281
281
  };
282
282
  /**
@@ -658,9 +658,11 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
658
658
 
659
659
 
660
660
  function setImagesStatusByIndex(index, data) {
661
- var newStatus = imagesStatusRef.current.slice();
662
- newStatus[index] = (0, _extends5.default)({}, newStatus[index] || {}, data);
663
- setImagesStatus(newStatus);
661
+ setImagesStatus(function (current) {
662
+ var newStatus = current.slice();
663
+ newStatus[index] = (0, _extends5.default)({}, newStatus[index] || {}, data);
664
+ return newStatus;
665
+ });
664
666
  }
665
667
  /**
666
668
  * 缩略图放大过渡动画设置
package/cjs/index.d.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  export { default as Tabs } from './tabs';
2
2
  export { default as Sticky } from './sticky';
3
- export { default as LoadMore } from './load-more';
4
- export { default as Cell } from './cell';
3
+ export { default as Portal } from './portal';
4
+ export { default as Toast } from './toast';
5
5
  export { default as ActionSheet } from './action-sheet';
6
6
  export { default as Avatar } from './avatar';
7
7
  export { default as Badge } from './badge';
8
8
  export { default as Button } from './button';
9
9
  export { default as Carousel } from './carousel';
10
+ export { default as Cell } from './cell';
10
11
  export { default as Checkbox } from './checkbox';
11
12
  export { default as CircleProgress } from './circle-progress';
12
13
  export { default as Collapse } from './collapse';
@@ -26,6 +27,7 @@ export { default as ImagePreview } from './image-preview';
26
27
  export { default as IndexBar } from './index-bar';
27
28
  export { default as Input } from './input';
28
29
  export { default as Keyboard } from './keyboard';
30
+ export { default as LoadMore } from './load-more';
29
31
  export { default as Loading } from './loading';
30
32
  export { default as Masking } from './masking';
31
33
  export { default as NavBar } from './nav-bar';
@@ -37,14 +39,13 @@ export { default as PickerView } from './picker-view';
37
39
  export { default as Popover } from './popover';
38
40
  export { default as Popup } from './popup';
39
41
  export { default as PopupSwiper } from './popup-swiper';
40
- export { default as Portal } from './portal';
41
42
  export { default as Progress } from './progress';
42
43
  export { default as PullRefresh } from './pull-refresh';
43
44
  export { default as Radio } from './radio';
44
45
  export { default as Rate } from './rate';
45
46
  export { default as SearchBar } from './search-bar';
46
- export { default as Skeleton } from './skeleton';
47
47
  export { default as ShowMonitor } from './show-monitor';
48
+ export { default as Skeleton } from './skeleton';
48
49
  export { default as Slider } from './slider';
49
50
  export { default as Stepper } from './stepper';
50
51
  export { default as Steps } from './steps';
@@ -54,5 +55,4 @@ export { default as Switch } from './switch';
54
55
  export { default as TabBar } from './tab-bar';
55
56
  export { default as Tag } from './tag';
56
57
  export { default as Textarea } from './textarea';
57
- export { default as Toast } from './toast';
58
58
  export { default as Transition } from './transition';
package/cjs/index.js CHANGED
@@ -13,13 +13,13 @@ var _sticky = _interopRequireDefault(require("./sticky"));
13
13
 
14
14
  exports.Sticky = _sticky.default;
15
15
 
16
- var _loadMore = _interopRequireDefault(require("./load-more"));
16
+ var _portal = _interopRequireDefault(require("./portal"));
17
17
 
18
- exports.LoadMore = _loadMore.default;
18
+ exports.Portal = _portal.default;
19
19
 
20
- var _cell = _interopRequireDefault(require("./cell"));
20
+ var _toast = _interopRequireDefault(require("./toast"));
21
21
 
22
- exports.Cell = _cell.default;
22
+ exports.Toast = _toast.default;
23
23
 
24
24
  var _actionSheet = _interopRequireDefault(require("./action-sheet"));
25
25
 
@@ -41,6 +41,10 @@ var _carousel = _interopRequireDefault(require("./carousel"));
41
41
 
42
42
  exports.Carousel = _carousel.default;
43
43
 
44
+ var _cell = _interopRequireDefault(require("./cell"));
45
+
46
+ exports.Cell = _cell.default;
47
+
44
48
  var _checkbox = _interopRequireDefault(require("./checkbox"));
45
49
 
46
50
  exports.Checkbox = _checkbox.default;
@@ -117,6 +121,10 @@ var _keyboard = _interopRequireDefault(require("./keyboard"));
117
121
 
118
122
  exports.Keyboard = _keyboard.default;
119
123
 
124
+ var _loadMore = _interopRequireDefault(require("./load-more"));
125
+
126
+ exports.LoadMore = _loadMore.default;
127
+
120
128
  var _loading = _interopRequireDefault(require("./loading"));
121
129
 
122
130
  exports.Loading = _loading.default;
@@ -161,10 +169,6 @@ var _popupSwiper = _interopRequireDefault(require("./popup-swiper"));
161
169
 
162
170
  exports.PopupSwiper = _popupSwiper.default;
163
171
 
164
- var _portal = _interopRequireDefault(require("./portal"));
165
-
166
- exports.Portal = _portal.default;
167
-
168
172
  var _progress = _interopRequireDefault(require("./progress"));
169
173
 
170
174
  exports.Progress = _progress.default;
@@ -185,14 +189,14 @@ var _searchBar = _interopRequireDefault(require("./search-bar"));
185
189
 
186
190
  exports.SearchBar = _searchBar.default;
187
191
 
188
- var _skeleton = _interopRequireDefault(require("./skeleton"));
189
-
190
- exports.Skeleton = _skeleton.default;
191
-
192
192
  var _showMonitor = _interopRequireDefault(require("./show-monitor"));
193
193
 
194
194
  exports.ShowMonitor = _showMonitor.default;
195
195
 
196
+ var _skeleton = _interopRequireDefault(require("./skeleton"));
197
+
198
+ exports.Skeleton = _skeleton.default;
199
+
196
200
  var _slider = _interopRequireDefault(require("./slider"));
197
201
 
198
202
  exports.Slider = _slider.default;
@@ -229,10 +233,6 @@ var _textarea = _interopRequireDefault(require("./textarea"));
229
233
 
230
234
  exports.Textarea = _textarea.default;
231
235
 
232
- var _toast = _interopRequireDefault(require("./toast"));
233
-
234
- exports.Toast = _toast.default;
235
-
236
236
  var _transition = _interopRequireDefault(require("./transition"));
237
237
 
238
238
  exports.Transition = _transition.default;
@@ -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 equals 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
@@ -134,6 +140,11 @@ export interface LoadMoreRef {
134
140
  * @en Change component state manually
135
141
  */
136
142
  changeStatus: (status: LoadMoreStatus, scene?: string) => void;
143
+ /**
144
+ * 判断是否滚动到底部并手动触发数据获取
145
+ * @en Determine whether to scroll to the bottom and manually trigger data acquisition
146
+ */
147
+ getDataWithEndReachCheck: () => void;
137
148
  }
138
149
  /**
139
150
  * 上拉加载组件,支持`scroll`和`click`两种触发加载方式,支持滚动监听。支持受控与不受控两种形式。<br>如果引入组件后发现仅触发了初始的`getData`,请确认是否在`getData`方法内没有调用`callback`移除 loading 状态,且未设置`blockWhenLoading`属性为 false。
@@ -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 () {
@@ -141,10 +147,18 @@ var LoadMore = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
141
147
  }
142
148
  };
143
149
  }, [trigger, disabled, getScrollContainer, handleContainerScroll, throttle]);
150
+
151
+ var getDataWithEndReachCheck = function getDataWithEndReachCheck() {
152
+ if (checkNeedTrigger(0, threshold)) {
153
+ triggerGetData('pageEnd');
154
+ }
155
+ };
156
+
144
157
  (0, _react.useImperativeHandle)(ref, function () {
145
158
  return {
146
159
  dom: domRef.current,
147
- changeStatus: changeStatus
160
+ changeStatus: changeStatus,
161
+ getDataWithEndReachCheck: getDataWithEndReachCheck
148
162
  };
149
163
  }, [changeStatus]);
150
164
 
@@ -205,11 +205,11 @@ declare const _default: React.ForwardRefExoticComponent<MaskingProps & React.Ref
205
205
  * @param {MaskingProps} config Configuration
206
206
  * @returns {{ close: () => void; update: (newConfig: MaskingProps) => void; }}
207
207
  */
208
- open: (config: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
208
+ open: (config: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
209
209
  key?: string | undefined;
210
210
  }, context?: import("../context-provider").GlobalContextParams | undefined) => {
211
211
  close: () => void;
212
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
212
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
213
213
  key?: string | undefined;
214
214
  }) => void;
215
215
  };
@@ -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
 
@@ -66,11 +66,11 @@ declare const _default: React.ForwardRefExoticComponent<PopupProps & React.RefAt
66
66
  * @param {PopupProps} config Configuration
67
67
  * @returns {{ close: () => void; update: (newConfig: PopupProps) => void; }}
68
68
  */
69
- open: (config: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset"> & {
69
+ open: (config: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset"> & {
70
70
  key?: string | undefined;
71
71
  }, context?: import("../context-provider").GlobalContextParams | undefined) => {
72
72
  close: () => void;
73
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset"> & {
73
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset"> & {
74
74
  key?: string | undefined;
75
75
  }) => void;
76
76
  };
@@ -76,11 +76,11 @@ declare const _default: React.ForwardRefExoticComponent<PopupSwiperProps & React
76
76
  * @param {string | PopupSwiperProps} config Configuration
77
77
  * @returns {{ close: () => void; update: (newConfig: PopupSwiperProps) => void; }}
78
78
  */
79
- open: (config: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
79
+ open: (config: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
80
80
  key?: string | undefined;
81
81
  }, context?: import("../context-provider").GlobalContextParams | undefined) => {
82
82
  close: () => void;
83
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
83
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
84
84
  key?: string | undefined;
85
85
  }) => void; /**
86
86
  * 内容面板 touchstart 事件,返回true时表示阻止本组件内部处理事件