antd-mobile 5.24.1 → 5.24.2
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/2x/bundle/antd-mobile.cjs.development.js +45 -39
- package/2x/bundle/antd-mobile.cjs.js +6 -6
- package/2x/bundle/antd-mobile.es.development.js +45 -39
- package/2x/bundle/antd-mobile.es.js +28 -35
- package/2x/bundle/antd-mobile.umd.development.js +45 -39
- package/2x/bundle/antd-mobile.umd.js +6 -6
- package/2x/bundle/style.css +1 -0
- package/2x/cjs/components/picker-view/picker-view.css +1 -0
- package/2x/cjs/components/slider/slider.js +1 -1
- package/2x/es/components/picker-view/picker-view.css +1 -0
- package/2x/es/components/slider/slider.js +1 -1
- package/2x/package.json +1 -1
- package/bundle/antd-mobile.cjs.development.js +45 -39
- package/bundle/antd-mobile.cjs.js +6 -6
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +45 -39
- package/bundle/antd-mobile.es.js +28 -35
- package/bundle/antd-mobile.umd.development.js +45 -39
- package/bundle/antd-mobile.umd.js +6 -6
- package/bundle/style.css +1 -1
- package/cjs/components/picker-view/picker-view.css +1 -0
- package/cjs/components/slider/slider.js +1 -1
- package/es/components/picker-view/picker-view.css +1 -0
- package/es/components/slider/slider.js +1 -1
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
package/2x/bundle/style.css
CHANGED
|
@@ -84,7 +84,7 @@ const Slider = p => {
|
|
|
84
84
|
return Object.keys(marks).map(parseFloat).sort((a, b) => a - b);
|
|
85
85
|
} else {
|
|
86
86
|
const points = [];
|
|
87
|
-
for (let i = (0, _big.default)(min); i.
|
|
87
|
+
for (let i = (0, _big.default)(min); i.lte(max); i = i.plus(step)) {
|
|
88
88
|
points.push(i.toNumber());
|
|
89
89
|
}
|
|
90
90
|
return points;
|
|
@@ -75,7 +75,7 @@ export const Slider = p => {
|
|
|
75
75
|
return Object.keys(marks).map(parseFloat).sort((a, b) => a - b);
|
|
76
76
|
} else {
|
|
77
77
|
const points = [];
|
|
78
|
-
for (let i = Big(min); i.
|
|
78
|
+
for (let i = Big(min); i.lte(max); i = i.plus(step)) {
|
|
79
79
|
points.push(i.toNumber());
|
|
80
80
|
}
|
|
81
81
|
return points;
|
package/2x/package.json
CHANGED
|
@@ -924,7 +924,7 @@ const isDev$1 = isDev;
|
|
|
924
924
|
function useMemoizedFn(fn) {
|
|
925
925
|
if (isDev$1) {
|
|
926
926
|
if (!isFunction$1(fn)) {
|
|
927
|
-
console.error("useMemoizedFn expected parameter is a function, got "
|
|
927
|
+
console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof fn));
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
930
|
var fnRef = React$1.useRef(fn);
|
|
@@ -961,7 +961,7 @@ function useLatest(value) {
|
|
|
961
961
|
var useUnmount = function useUnmount2(fn) {
|
|
962
962
|
if (isDev$1) {
|
|
963
963
|
if (!isFunction$1(fn)) {
|
|
964
|
-
console.error("useUnmount expected parameter is a function, got "
|
|
964
|
+
console.error("useUnmount expected parameter is a function, got ".concat(typeof fn));
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
967
|
var fnRef = useLatest(fn);
|
|
@@ -1130,7 +1130,7 @@ var throttle_1 = throttle$1;
|
|
|
1130
1130
|
var useMount = function useMount2(fn) {
|
|
1131
1131
|
if (isDev$1) {
|
|
1132
1132
|
if (!isFunction$1(fn)) {
|
|
1133
|
-
console.error('useMount: parameter `fn` expected to be a function, but got "'
|
|
1133
|
+
console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof fn, '".'));
|
|
1134
1134
|
}
|
|
1135
1135
|
}
|
|
1136
1136
|
React$1.useEffect(function() {
|
|
@@ -1507,17 +1507,22 @@ var __read$6 = globalThis && globalThis.__read || function(o, n) {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
return ar;
|
|
1509
1509
|
};
|
|
1510
|
-
var
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1510
|
+
var __spreadArray$2 = globalThis && globalThis.__spreadArray || function(to2, from, pack) {
|
|
1511
|
+
if (pack || arguments.length === 2)
|
|
1512
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
1513
|
+
if (ar || !(i in from)) {
|
|
1514
|
+
if (!ar)
|
|
1515
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
1516
|
+
ar[i] = from[i];
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
return to2.concat(ar || Array.prototype.slice.call(from));
|
|
1515
1520
|
};
|
|
1516
1521
|
function useDebounceFn(fn, options) {
|
|
1517
1522
|
var _a;
|
|
1518
1523
|
if (isDev$1) {
|
|
1519
1524
|
if (!isFunction$1(fn)) {
|
|
1520
|
-
console.error("useDebounceFn expected parameter is a function, got "
|
|
1525
|
+
console.error("useDebounceFn expected parameter is a function, got ".concat(typeof fn));
|
|
1521
1526
|
}
|
|
1522
1527
|
}
|
|
1523
1528
|
var fnRef = useLatest(fn);
|
|
@@ -1528,7 +1533,7 @@ function useDebounceFn(fn, options) {
|
|
|
1528
1533
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1529
1534
|
args[_i] = arguments[_i];
|
|
1530
1535
|
}
|
|
1531
|
-
return fnRef.current.apply(fnRef,
|
|
1536
|
+
return fnRef.current.apply(fnRef, __spreadArray$2([], __read$6(args), false));
|
|
1532
1537
|
}, wait, options);
|
|
1533
1538
|
}, []);
|
|
1534
1539
|
useUnmount$1(function() {
|
|
@@ -2928,11 +2933,16 @@ var __read$3 = globalThis && globalThis.__read || function(o, n) {
|
|
|
2928
2933
|
}
|
|
2929
2934
|
return ar;
|
|
2930
2935
|
};
|
|
2931
|
-
var
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
+
var __spreadArray$1 = globalThis && globalThis.__spreadArray || function(to2, from, pack) {
|
|
2937
|
+
if (pack || arguments.length === 2)
|
|
2938
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
2939
|
+
if (ar || !(i in from)) {
|
|
2940
|
+
if (!ar)
|
|
2941
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
2942
|
+
ar[i] = from[i];
|
|
2943
|
+
}
|
|
2944
|
+
}
|
|
2945
|
+
return to2.concat(ar || Array.prototype.slice.call(from));
|
|
2936
2946
|
};
|
|
2937
2947
|
function useLockFn(fn) {
|
|
2938
2948
|
var _this = this;
|
|
@@ -2948,32 +2958,22 @@ function useLockFn(fn) {
|
|
|
2948
2958
|
switch (_a.label) {
|
|
2949
2959
|
case 0:
|
|
2950
2960
|
if (lockRef.current)
|
|
2951
|
-
return [
|
|
2952
|
-
2
|
|
2953
|
-
];
|
|
2961
|
+
return [2];
|
|
2954
2962
|
lockRef.current = true;
|
|
2955
2963
|
_a.label = 1;
|
|
2956
2964
|
case 1:
|
|
2957
2965
|
_a.trys.push([1, 3, , 4]);
|
|
2958
|
-
return [
|
|
2959
|
-
4,
|
|
2960
|
-
fn.apply(void 0, __spread$1(args))
|
|
2961
|
-
];
|
|
2966
|
+
return [4, fn.apply(void 0, __spreadArray$1([], __read$3(args), false))];
|
|
2962
2967
|
case 2:
|
|
2963
2968
|
ret = _a.sent();
|
|
2964
2969
|
lockRef.current = false;
|
|
2965
|
-
return [
|
|
2966
|
-
2,
|
|
2967
|
-
ret
|
|
2968
|
-
];
|
|
2970
|
+
return [2, ret];
|
|
2969
2971
|
case 3:
|
|
2970
2972
|
e_1 = _a.sent();
|
|
2971
2973
|
lockRef.current = false;
|
|
2972
2974
|
throw e_1;
|
|
2973
2975
|
case 4:
|
|
2974
|
-
return [
|
|
2975
|
-
2
|
|
2976
|
-
];
|
|
2976
|
+
return [2];
|
|
2977
2977
|
}
|
|
2978
2978
|
});
|
|
2979
2979
|
});
|
|
@@ -3574,17 +3574,22 @@ var __read = globalThis && globalThis.__read || function(o, n) {
|
|
|
3574
3574
|
}
|
|
3575
3575
|
return ar;
|
|
3576
3576
|
};
|
|
3577
|
-
var
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3577
|
+
var __spreadArray = globalThis && globalThis.__spreadArray || function(to2, from, pack) {
|
|
3578
|
+
if (pack || arguments.length === 2)
|
|
3579
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3580
|
+
if (ar || !(i in from)) {
|
|
3581
|
+
if (!ar)
|
|
3582
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
3583
|
+
ar[i] = from[i];
|
|
3584
|
+
}
|
|
3585
|
+
}
|
|
3586
|
+
return to2.concat(ar || Array.prototype.slice.call(from));
|
|
3582
3587
|
};
|
|
3583
3588
|
function useThrottleFn(fn, options) {
|
|
3584
3589
|
var _a;
|
|
3585
3590
|
if (isDev$1) {
|
|
3586
3591
|
if (!isFunction$1(fn)) {
|
|
3587
|
-
console.error("useThrottleFn expected parameter is a function, got "
|
|
3592
|
+
console.error("useThrottleFn expected parameter is a function, got ".concat(typeof fn));
|
|
3588
3593
|
}
|
|
3589
3594
|
}
|
|
3590
3595
|
var fnRef = useLatest(fn);
|
|
@@ -3595,7 +3600,7 @@ function useThrottleFn(fn, options) {
|
|
|
3595
3600
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3596
3601
|
args[_i] = arguments[_i];
|
|
3597
3602
|
}
|
|
3598
|
-
return fnRef.current.apply(fnRef,
|
|
3603
|
+
return fnRef.current.apply(fnRef, __spreadArray([], __read(args), false));
|
|
3599
3604
|
}, wait, options);
|
|
3600
3605
|
}, []);
|
|
3601
3606
|
useUnmount$1(function() {
|
|
@@ -3609,10 +3614,11 @@ function useThrottleFn(fn, options) {
|
|
|
3609
3614
|
}
|
|
3610
3615
|
function useTimeout(fn, delay) {
|
|
3611
3616
|
var fnRef = useLatest(fn);
|
|
3612
|
-
var timerRef = React$1.useRef();
|
|
3617
|
+
var timerRef = React$1.useRef(null);
|
|
3613
3618
|
React$1.useEffect(function() {
|
|
3614
|
-
if (!isNumber(delay) || delay < 0)
|
|
3619
|
+
if (!isNumber(delay) || delay < 0) {
|
|
3615
3620
|
return;
|
|
3621
|
+
}
|
|
3616
3622
|
timerRef.current = setTimeout(function() {
|
|
3617
3623
|
fnRef.current();
|
|
3618
3624
|
}, delay);
|
|
@@ -24132,7 +24138,7 @@ const Slider = (p) => {
|
|
|
24132
24138
|
return Object.keys(marks).map(parseFloat).sort((a, b) => a - b);
|
|
24133
24139
|
} else {
|
|
24134
24140
|
const points = [];
|
|
24135
|
-
for (let i = Big(min2); i.
|
|
24141
|
+
for (let i = Big(min2); i.lte(max2); i = i.plus(step)) {
|
|
24136
24142
|
points.push(i.toNumber());
|
|
24137
24143
|
}
|
|
24138
24144
|
return points;
|