@arco-design/mobile-react 2.29.4 → 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.
- package/CHANGELOG.md +15 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/action-sheet/index.d.ts +2 -2
- package/cjs/dialog/index.d.ts +2 -2
- package/cjs/image-picker/index.js +14 -6
- package/cjs/image-preview/index.d.ts +2 -2
- package/cjs/image-preview/index.js +5 -3
- package/cjs/index.d.ts +5 -5
- package/cjs/index.js +16 -16
- package/cjs/load-more/index.d.ts +7 -2
- package/cjs/load-more/index.js +9 -1
- package/cjs/masking/index.d.ts +2 -2
- package/cjs/popup/index.d.ts +2 -2
- package/cjs/popup-swiper/index.d.ts +2 -2
- package/cjs/pull-refresh/android-pull-refresh.js +12 -20
- package/cjs/pull-refresh/hooks.js +2 -2
- package/cjs/pull-refresh/style/css/index.css +0 -1
- package/cjs/pull-refresh/style/index.less +0 -1
- package/cjs/style.d.ts +5 -5
- package/cjs/style.js +8 -8
- package/cjs/tabs/tab-pane.js +5 -2
- package/cjs/toast/index.d.ts +12 -12
- package/dist/index.js +2421 -2409
- package/dist/index.min.js +4 -4
- package/dist/style.css +503 -504
- package/dist/style.min.css +1 -1
- package/esm/action-sheet/index.d.ts +2 -2
- package/esm/dialog/index.d.ts +2 -2
- package/esm/image-picker/index.js +13 -6
- package/esm/image-preview/index.d.ts +2 -2
- package/esm/image-preview/index.js +5 -3
- package/esm/index.d.ts +5 -5
- package/esm/index.js +5 -5
- package/esm/load-more/index.d.ts +7 -2
- package/esm/load-more/index.js +9 -1
- package/esm/masking/index.d.ts +2 -2
- package/esm/popup/index.d.ts +2 -2
- package/esm/popup-swiper/index.d.ts +2 -2
- package/esm/pull-refresh/android-pull-refresh.js +13 -22
- package/esm/pull-refresh/hooks.js +2 -2
- package/esm/pull-refresh/style/css/index.css +0 -1
- package/esm/pull-refresh/style/index.less +0 -1
- package/esm/style.d.ts +5 -5
- package/esm/style.js +5 -5
- package/esm/tabs/tab-pane.js +6 -3
- package/esm/toast/index.d.ts +12 -12
- package/package.json +3 -3
- package/umd/action-sheet/index.d.ts +2 -2
- package/umd/dialog/index.d.ts +2 -2
- package/umd/image-picker/index.js +16 -10
- package/umd/image-preview/index.d.ts +2 -2
- package/umd/image-preview/index.js +5 -3
- package/umd/index.d.ts +5 -5
- package/umd/index.js +14 -14
- package/umd/load-more/index.d.ts +7 -2
- package/umd/load-more/index.js +9 -1
- package/umd/masking/index.d.ts +2 -2
- package/umd/popup/index.d.ts +2 -2
- package/umd/popup-swiper/index.d.ts +2 -2
- package/umd/pull-refresh/android-pull-refresh.js +15 -24
- package/umd/pull-refresh/hooks.js +2 -2
- package/umd/pull-refresh/style/css/index.css +0 -1
- package/umd/pull-refresh/style/index.less +0 -1
- package/umd/style.d.ts +5 -5
- package/umd/style.js +2 -2
- package/umd/tabs/tab-pane.js +5 -2
- package/umd/toast/index.d.ts +12 -12
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arco-design/mobile-react",
|
3
|
-
"version": "2.29.
|
3
|
+
"version": "2.29.5",
|
4
4
|
"description": "",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "esm/index.js",
|
@@ -15,7 +15,7 @@
|
|
15
15
|
"author": "taoyiyue@bytedance.com",
|
16
16
|
"license": "ISC",
|
17
17
|
"dependencies": {
|
18
|
-
"@arco-design/mobile-utils": "2.16.
|
18
|
+
"@arco-design/mobile-utils": "2.16.8",
|
19
19
|
"@arco-design/transformable": "^1.0.0",
|
20
20
|
"lodash.throttle": "^4.1.1",
|
21
21
|
"resize-observer-polyfill": "^1.5.1"
|
@@ -49,5 +49,5 @@
|
|
49
49
|
"publishConfig": {
|
50
50
|
"access": "public"
|
51
51
|
},
|
52
|
-
"gitHead": "
|
52
|
+
"gitHead": "eca19563a4f83ce7acecb0a4e8e11e4ee258189e"
|
53
53
|
}
|
@@ -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" | "
|
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" | "
|
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
|
};
|
package/umd/dialog/index.d.ts
CHANGED
@@ -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" | "
|
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" | "
|
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
|
};
|
@@ -1,16 +1,16 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["exports", "@babel/runtime/helpers/extends", "react", "es6-promise", "@arco-design/mobile-utils", "../context-provider", "../icon", "../image", "../grid", "./add-icon", "./type"], factory);
|
3
|
+
define(["exports", "@babel/runtime/helpers/extends", "react", "es6-promise", "@arco-design/mobile-utils", "../context-provider", "../icon", "../image", "../grid", "./add-icon", "../_helpers", "./type"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(exports, require("@babel/runtime/helpers/extends"), require("react"), require("es6-promise"), require("@arco-design/mobile-utils"), require("../context-provider"), require("../icon"), require("../image"), require("../grid"), require("./add-icon"), require("./type"));
|
5
|
+
factory(exports, require("@babel/runtime/helpers/extends"), require("react"), require("es6-promise"), require("@arco-design/mobile-utils"), require("../context-provider"), require("../icon"), require("../image"), require("../grid"), require("./add-icon"), require("../_helpers"), require("./type"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(mod.exports, global._extends, global.react, global.es6Promise, global.mobileUtils, global.contextProvider, global.icon, global.image, global.grid, global.addIcon, global.type);
|
10
|
+
factory(mod.exports, global._extends, global.react, global.es6Promise, global.mobileUtils, global.contextProvider, global.icon, global.image, global.grid, global.addIcon, global._helpers, global.type);
|
11
11
|
global.index = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _extends2, _react, _es6Promise, _mobileUtils, _contextProvider, _icon, _image, _grid, _addIcon, _type) {
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _extends2, _react, _es6Promise, _mobileUtils, _contextProvider, _icon, _image, _grid, _addIcon, _helpers, _type) {
|
14
14
|
"use strict";
|
15
15
|
|
16
16
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
@@ -78,7 +78,7 @@
|
|
78
78
|
onDeleteClick = props.onDeleteClick;
|
79
79
|
var domRef = (0, _react.useRef)(null);
|
80
80
|
var fileRef = (0, _react.useRef)(null);
|
81
|
-
var cacheRef = (0,
|
81
|
+
var cacheRef = (0, _helpers.useLatestRef)(images);
|
82
82
|
(0, _react.useImperativeHandle)(ref, function () {
|
83
83
|
return {
|
84
84
|
dom: domRef.current
|
@@ -145,7 +145,7 @@
|
|
145
145
|
file: files[index]
|
146
146
|
};
|
147
147
|
});
|
148
|
-
cacheRef.current = [].concat(
|
148
|
+
cacheRef.current = [].concat(cacheRef.current, res);
|
149
149
|
onChange([].concat(cacheRef.current)); // 执行upload
|
150
150
|
|
151
151
|
if (typeof upload === 'function') {
|
@@ -158,15 +158,21 @@
|
|
158
158
|
var file = _ref2.file;
|
159
159
|
return file === _file;
|
160
160
|
});
|
161
|
-
|
162
|
-
|
163
|
-
|
161
|
+
|
162
|
+
if (index !== -1) {
|
163
|
+
cacheRef.current[index] = (0, _extends2.default)({}, cacheRef.current[index], data, {
|
164
|
+
status: undefined
|
165
|
+
});
|
166
|
+
}
|
164
167
|
}).catch(function () {
|
165
168
|
var index = cacheRef.current.findIndex(function (_ref3) {
|
166
169
|
var file = _ref3.file;
|
167
170
|
return file === _file;
|
168
171
|
});
|
169
|
-
|
172
|
+
|
173
|
+
if (index !== -1) {
|
174
|
+
cacheRef.current[index].status = 'error';
|
175
|
+
}
|
170
176
|
}).finally(function () {
|
171
177
|
onChange([].concat(cacheRef.current));
|
172
178
|
});
|
@@ -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" | "
|
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" | "
|
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
|
/**
|
@@ -652,9 +652,11 @@
|
|
652
652
|
|
653
653
|
|
654
654
|
function setImagesStatusByIndex(index, data) {
|
655
|
-
|
656
|
-
|
657
|
-
|
655
|
+
setImagesStatus(function (current) {
|
656
|
+
var newStatus = current.slice();
|
657
|
+
newStatus[index] = (0, _extends5.default)({}, newStatus[index] || {}, data);
|
658
|
+
return newStatus;
|
659
|
+
});
|
658
660
|
}
|
659
661
|
/**
|
660
662
|
* 缩略图放大过渡动画设置
|
package/umd/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
|
4
|
-
export { default as
|
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/umd/index.js
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["exports", "./tabs", "./sticky", "./
|
3
|
+
define(["exports", "./tabs", "./sticky", "./portal", "./toast", "./action-sheet", "./avatar", "./badge", "./button", "./carousel", "./cell", "./checkbox", "./circle-progress", "./collapse", "./context-provider", "./count-down", "./date-picker", "./dialog", "./divider", "./dropdown", "./dropdown-menu", "./ellipsis", "./form", "./grid", "./image", "./image-picker", "./image-preview", "./index-bar", "./input", "./keyboard", "./load-more", "./loading", "./masking", "./nav-bar", "./notice-bar", "./notify", "./pagination", "./picker", "./picker-view", "./popover", "./popup", "./popup-swiper", "./progress", "./pull-refresh", "./radio", "./rate", "./search-bar", "./show-monitor", "./skeleton", "./slider", "./stepper", "./steps", "./swipe-action", "./swipe-load", "./switch", "./tab-bar", "./tag", "./textarea", "./transition"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(exports, require("./tabs"), require("./sticky"), require("./
|
5
|
+
factory(exports, require("./tabs"), require("./sticky"), require("./portal"), require("./toast"), require("./action-sheet"), require("./avatar"), require("./badge"), require("./button"), require("./carousel"), require("./cell"), require("./checkbox"), require("./circle-progress"), require("./collapse"), require("./context-provider"), require("./count-down"), require("./date-picker"), require("./dialog"), require("./divider"), require("./dropdown"), require("./dropdown-menu"), require("./ellipsis"), require("./form"), require("./grid"), require("./image"), require("./image-picker"), require("./image-preview"), require("./index-bar"), require("./input"), require("./keyboard"), require("./load-more"), require("./loading"), require("./masking"), require("./nav-bar"), require("./notice-bar"), require("./notify"), require("./pagination"), require("./picker"), require("./picker-view"), require("./popover"), require("./popup"), require("./popup-swiper"), require("./progress"), require("./pull-refresh"), require("./radio"), require("./rate"), require("./search-bar"), require("./show-monitor"), require("./skeleton"), require("./slider"), require("./stepper"), require("./steps"), require("./swipe-action"), require("./swipe-load"), require("./switch"), require("./tab-bar"), require("./tag"), require("./textarea"), require("./transition"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(mod.exports, global.tabs, global.sticky, global.
|
10
|
+
factory(mod.exports, global.tabs, global.sticky, global.portal, global.toast, global.actionSheet, global.avatar, global.badge, global.button, global.carousel, global.cell, global.checkbox, global.circleProgress, global.collapse, global.contextProvider, global.countDown, global.datePicker, global.dialog, global.divider, global.dropdown, global.dropdownMenu, global.ellipsis, global.form, global.grid, global.image, global.imagePicker, global.imagePreview, global.indexBar, global.input, global.keyboard, global.loadMore, global.loading, global.masking, global.navBar, global.noticeBar, global.notify, global.pagination, global.picker, global.pickerView, global.popover, global.popup, global.popupSwiper, global.progress, global.pullRefresh, global.radio, global.rate, global.searchBar, global.showMonitor, global.skeleton, global.slider, global.stepper, global.steps, global.swipeAction, global.swipeLoad, global._switch, global.tabBar, global.tag, global.textarea, global.transition);
|
11
11
|
global.index = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _tabs, _sticky,
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _tabs, _sticky, _portal, _toast, _actionSheet, _avatar, _badge, _button, _carousel, _cell, _checkbox, _circleProgress, _collapse, _contextProvider, _countDown, _datePicker, _dialog, _divider, _dropdown, _dropdownMenu, _ellipsis, _form, _grid, _image, _imagePicker, _imagePreview, _indexBar, _input, _keyboard, _loadMore, _loading, _masking, _navBar, _noticeBar, _notify, _pagination, _picker, _pickerView, _popover, _popup, _popupSwiper, _progress, _pullRefresh, _radio, _rate, _searchBar, _showMonitor, _skeleton, _slider, _stepper, _steps, _swipeAction, _swipeLoad, _switch, _tabBar, _tag, _textarea, _transition) {
|
14
14
|
"use strict";
|
15
15
|
|
16
16
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
@@ -21,10 +21,10 @@
|
|
21
21
|
_exports.Tabs = _tabs.default;
|
22
22
|
_sticky = _interopRequireDefault(_sticky);
|
23
23
|
_exports.Sticky = _sticky.default;
|
24
|
-
|
25
|
-
_exports.
|
26
|
-
|
27
|
-
_exports.
|
24
|
+
_portal = _interopRequireDefault(_portal);
|
25
|
+
_exports.Portal = _portal.default;
|
26
|
+
_toast = _interopRequireDefault(_toast);
|
27
|
+
_exports.Toast = _toast.default;
|
28
28
|
_actionSheet = _interopRequireDefault(_actionSheet);
|
29
29
|
_exports.ActionSheet = _actionSheet.default;
|
30
30
|
_avatar = _interopRequireDefault(_avatar);
|
@@ -35,6 +35,8 @@
|
|
35
35
|
_exports.Button = _button.default;
|
36
36
|
_carousel = _interopRequireDefault(_carousel);
|
37
37
|
_exports.Carousel = _carousel.default;
|
38
|
+
_cell = _interopRequireDefault(_cell);
|
39
|
+
_exports.Cell = _cell.default;
|
38
40
|
_checkbox = _interopRequireDefault(_checkbox);
|
39
41
|
_exports.Checkbox = _checkbox.default;
|
40
42
|
_circleProgress = _interopRequireDefault(_circleProgress);
|
@@ -73,6 +75,8 @@
|
|
73
75
|
_exports.Input = _input.default;
|
74
76
|
_keyboard = _interopRequireDefault(_keyboard);
|
75
77
|
_exports.Keyboard = _keyboard.default;
|
78
|
+
_loadMore = _interopRequireDefault(_loadMore);
|
79
|
+
_exports.LoadMore = _loadMore.default;
|
76
80
|
_loading = _interopRequireDefault(_loading);
|
77
81
|
_exports.Loading = _loading.default;
|
78
82
|
_masking = _interopRequireDefault(_masking);
|
@@ -95,8 +99,6 @@
|
|
95
99
|
_exports.Popup = _popup.default;
|
96
100
|
_popupSwiper = _interopRequireDefault(_popupSwiper);
|
97
101
|
_exports.PopupSwiper = _popupSwiper.default;
|
98
|
-
_portal = _interopRequireDefault(_portal);
|
99
|
-
_exports.Portal = _portal.default;
|
100
102
|
_progress = _interopRequireDefault(_progress);
|
101
103
|
_exports.Progress = _progress.default;
|
102
104
|
_pullRefresh = _interopRequireDefault(_pullRefresh);
|
@@ -107,10 +109,10 @@
|
|
107
109
|
_exports.Rate = _rate.default;
|
108
110
|
_searchBar = _interopRequireDefault(_searchBar);
|
109
111
|
_exports.SearchBar = _searchBar.default;
|
110
|
-
_skeleton = _interopRequireDefault(_skeleton);
|
111
|
-
_exports.Skeleton = _skeleton.default;
|
112
112
|
_showMonitor = _interopRequireDefault(_showMonitor);
|
113
113
|
_exports.ShowMonitor = _showMonitor.default;
|
114
|
+
_skeleton = _interopRequireDefault(_skeleton);
|
115
|
+
_exports.Skeleton = _skeleton.default;
|
114
116
|
_slider = _interopRequireDefault(_slider);
|
115
117
|
_exports.Slider = _slider.default;
|
116
118
|
_stepper = _interopRequireDefault(_stepper);
|
@@ -129,8 +131,6 @@
|
|
129
131
|
_exports.Tag = _tag.default;
|
130
132
|
_textarea = _interopRequireDefault(_textarea);
|
131
133
|
_exports.Textarea = _textarea.default;
|
132
|
-
_toast = _interopRequireDefault(_toast);
|
133
|
-
_exports.Toast = _toast.default;
|
134
134
|
_transition = _interopRequireDefault(_transition);
|
135
135
|
_exports.Transition = _transition.default;
|
136
136
|
});
|
package/umd/load-more/index.d.ts
CHANGED
@@ -108,8 +108,8 @@ export interface LoadMoreProps {
|
|
108
108
|
*/
|
109
109
|
getDataAtFirst?: boolean;
|
110
110
|
/**
|
111
|
-
* 当 getDataAtFirst
|
112
|
-
* @en Whether to trigger a request when getDataAtFirst
|
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
113
|
* @default false
|
114
114
|
*/
|
115
115
|
getDataWhenNoScrollAtFirst?: boolean;
|
@@ -140,6 +140,11 @@ export interface LoadMoreRef {
|
|
140
140
|
* @en Change component state manually
|
141
141
|
*/
|
142
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;
|
143
148
|
}
|
144
149
|
/**
|
145
150
|
* 上拉加载组件,支持`scroll`和`click`两种触发加载方式,支持滚动监听。支持受控与不受控两种形式。<br>如果引入组件后发现仅触发了初始的`getData`,请确认是否在`getData`方法内没有调用`callback`移除 loading 状态,且未设置`blockWhenLoading`属性为 false。
|
package/umd/load-more/index.js
CHANGED
@@ -152,10 +152,18 @@
|
|
152
152
|
}
|
153
153
|
};
|
154
154
|
}, [trigger, disabled, getScrollContainer, handleContainerScroll, throttle]);
|
155
|
+
|
156
|
+
var getDataWithEndReachCheck = function getDataWithEndReachCheck() {
|
157
|
+
if (checkNeedTrigger(0, threshold)) {
|
158
|
+
triggerGetData('pageEnd');
|
159
|
+
}
|
160
|
+
};
|
161
|
+
|
155
162
|
(0, _react.useImperativeHandle)(ref, function () {
|
156
163
|
return {
|
157
164
|
dom: domRef.current,
|
158
|
-
changeStatus: changeStatus
|
165
|
+
changeStatus: changeStatus,
|
166
|
+
getDataWithEndReachCheck: getDataWithEndReachCheck
|
159
167
|
};
|
160
168
|
}, [changeStatus]);
|
161
169
|
|
package/umd/masking/index.d.ts
CHANGED
@@ -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" | "
|
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" | "
|
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
|
};
|
package/umd/popup/index.d.ts
CHANGED
@@ -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" | "
|
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" | "
|
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" | "
|
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" | "
|
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时表示阻止本组件内部处理事件
|
@@ -1,22 +1,23 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["exports", "react", "@arco-design/mobile-utils", "../loading", "../context-provider", "./model", "./hooks", "../_helpers"], factory);
|
3
|
+
define(["exports", "@babel/runtime/helpers/extends", "react", "@arco-design/mobile-utils", "../loading", "../context-provider", "./model", "./hooks", "../_helpers"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(exports, require("react"), require("@arco-design/mobile-utils"), require("../loading"), require("../context-provider"), require("./model"), require("./hooks"), require("../_helpers"));
|
5
|
+
factory(exports, require("@babel/runtime/helpers/extends"), require("react"), require("@arco-design/mobile-utils"), require("../loading"), require("../context-provider"), require("./model"), require("./hooks"), require("../_helpers"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(mod.exports, global.react, global.mobileUtils, global.loading, global.contextProvider, global.model, global.hooks, global._helpers);
|
10
|
+
factory(mod.exports, global._extends, global.react, global.mobileUtils, global.loading, global.contextProvider, global.model, global.hooks, global._helpers);
|
11
11
|
global.androidPullRefresh = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _react, _mobileUtils, _loading, _contextProvider, _model, _hooks, _helpers) {
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _extends2, _react, _mobileUtils, _loading, _contextProvider, _model, _hooks, _helpers) {
|
14
14
|
"use strict";
|
15
15
|
|
16
16
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
17
17
|
|
18
18
|
_exports.__esModule = true;
|
19
19
|
_exports.PullRefresh = void 0;
|
20
|
+
_extends2 = _interopRequireDefault(_extends2);
|
20
21
|
_react = _interopRequireWildcard(_react);
|
21
22
|
_loading = _interopRequireDefault(_loading);
|
22
23
|
|
@@ -71,11 +72,7 @@
|
|
71
72
|
onRefresh = props.onRefresh,
|
72
73
|
_props$allowPullWhenN = props.allowPullWhenNotTop,
|
73
74
|
allowPullWhenNotTop = _props$allowPullWhenN === void 0 ? false : _props$allowPullWhenN;
|
74
|
-
|
75
|
-
var _useState = (0, _react.useState)({}),
|
76
|
-
transition = _useState[0],
|
77
|
-
setTransition = _useState[1];
|
78
|
-
|
75
|
+
var placeRef = (0, _react.useRef)(null);
|
79
76
|
var touchRef = (0, _react.useRef)(null);
|
80
77
|
var currentTranslateYRef = (0, _react.useRef)(0);
|
81
78
|
var onTouching = (0, _react.useRef)(false);
|
@@ -112,17 +109,7 @@
|
|
112
109
|
|
113
110
|
var scroll = function scroll(y, ms, callback) {
|
114
111
|
if (y < 5) {
|
115
|
-
if (y < 0) {
|
116
|
-
currentTranslateYRef.current = 0;
|
117
|
-
return;
|
118
|
-
}
|
119
|
-
|
120
|
-
if (ms === 0) {
|
121
|
-
setTimeout(function () {
|
122
|
-
setTransition({
|
123
|
-
transition: 'all 0s'
|
124
|
-
});
|
125
|
-
});
|
112
|
+
if (y < 0 || ms === 0) {
|
126
113
|
currentTranslateYRef.current = 0;
|
127
114
|
return;
|
128
115
|
}
|
@@ -130,10 +117,11 @@
|
|
130
117
|
|
131
118
|
var translateY = dampRateCalculate(y, loosingHeight, dampRate);
|
132
119
|
currentTranslateYRef.current = translateY;
|
133
|
-
|
134
|
-
transform: translateY ? "translateY(" + translateY + "px)" : ''
|
120
|
+
placeRef.current && (0, _helpers.setStyleWithVendor)(placeRef.current, (0, _extends2.default)({
|
121
|
+
transform: translateY ? "translateY(" + translateY + "px) translateZ(0)" : ''
|
122
|
+
}, ms ? {
|
135
123
|
transition: "all " + ms / 1000 + "s"
|
136
|
-
});
|
124
|
+
} : {}));
|
137
125
|
setTimeout(function () {
|
138
126
|
callback == null ? void 0 : callback();
|
139
127
|
}, ms);
|
@@ -151,6 +139,9 @@
|
|
151
139
|
|
152
140
|
loadingRef.current = false;
|
153
141
|
setStatus(_model.PullRefreshStatus.Static);
|
142
|
+
placeRef.current && (0, _helpers.setStyleWithVendor)(placeRef.current, {
|
143
|
+
transition: ''
|
144
|
+
});
|
154
145
|
callback();
|
155
146
|
});
|
156
147
|
};
|
@@ -278,7 +269,7 @@
|
|
278
269
|
ref: domRef
|
279
270
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
280
271
|
className: (0, _mobileUtils.cls)(prefixCls + "-pull-refresh-place"),
|
281
|
-
|
272
|
+
ref: placeRef
|
282
273
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
283
274
|
className: (0, _mobileUtils.cls)(prefixCls + "-pull-refresh-label"),
|
284
275
|
ref: labelRef,
|
@@ -117,9 +117,9 @@
|
|
117
117
|
var allowPullWhenNotTop = _ref3.allowPullWhenNotTop,
|
118
118
|
domRef = _ref3.domRef;
|
119
119
|
var ifShouldHandle = (0, _react.useCallback)(function () {
|
120
|
-
var _domRef$current$
|
120
|
+
var _domRef$current$offse, _domRef$current9;
|
121
121
|
|
122
|
-
var domRefHeight = (_domRef$current$
|
122
|
+
var domRefHeight = (_domRef$current$offse = (_domRef$current9 = domRef.current) == null ? void 0 : _domRef$current9.offsetHeight) != null ? _domRef$current$offse : 0;
|
123
123
|
return domRef.current && !(!allowPullWhenNotTop && (domRef.current.scrollTop < 0 || domRef.current.scrollTop > domRef.current.scrollHeight - domRefHeight));
|
124
124
|
}, [allowPullWhenNotTop]);
|
125
125
|
return {
|
package/umd/style.d.ts
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
import '../style/public.less';
|
2
2
|
import './tabs/style';
|
3
3
|
import './sticky/style';
|
4
|
-
import './
|
5
|
-
import './
|
4
|
+
import './portal/style';
|
5
|
+
import './toast/style';
|
6
6
|
import './action-sheet/style';
|
7
7
|
import './avatar/style';
|
8
8
|
import './badge/style';
|
9
9
|
import './button/style';
|
10
10
|
import './carousel/style';
|
11
|
+
import './cell/style';
|
11
12
|
import './checkbox/style';
|
12
13
|
import './circle-progress/style';
|
13
14
|
import './collapse/style';
|
@@ -27,6 +28,7 @@ import './image-preview/style';
|
|
27
28
|
import './index-bar/style';
|
28
29
|
import './input/style';
|
29
30
|
import './keyboard/style';
|
31
|
+
import './load-more/style';
|
30
32
|
import './loading/style';
|
31
33
|
import './masking/style';
|
32
34
|
import './nav-bar/style';
|
@@ -38,14 +40,13 @@ import './picker-view/style';
|
|
38
40
|
import './popover/style';
|
39
41
|
import './popup/style';
|
40
42
|
import './popup-swiper/style';
|
41
|
-
import './portal/style';
|
42
43
|
import './progress/style';
|
43
44
|
import './pull-refresh/style';
|
44
45
|
import './radio/style';
|
45
46
|
import './rate/style';
|
46
47
|
import './search-bar/style';
|
47
|
-
import './skeleton/style';
|
48
48
|
import './show-monitor/style';
|
49
|
+
import './skeleton/style';
|
49
50
|
import './slider/style';
|
50
51
|
import './stepper/style';
|
51
52
|
import './steps/style';
|
@@ -55,5 +56,4 @@ import './switch/style';
|
|
55
56
|
import './tab-bar/style';
|
56
57
|
import './tag/style';
|
57
58
|
import './textarea/style';
|
58
|
-
import './toast/style';
|
59
59
|
import './transition/style';
|