antd-mobile 5.10.0 → 5.10.1
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/cjs/components/stepper/stepper.js +1 -1
- package/2x/cjs/components/swiper/swiper.js +1 -0
- package/2x/es/components/stepper/stepper.js +1 -1
- package/2x/es/components/swiper/swiper.js +1 -0
- package/2x/package.json +1 -1
- package/bundle/antd-mobile.cjs.js +3 -1
- package/bundle/antd-mobile.es.js +3 -1
- package/cjs/components/stepper/stepper.js +1 -1
- package/cjs/components/swiper/swiper.js +1 -0
- package/es/components/stepper/stepper.js +1 -1
- package/es/components/swiper/swiper.js +1 -0
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -129,6 +129,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
129
129
|
},
|
|
130
130
|
onRest: () => {
|
|
131
131
|
if (draggingRef.current) return;
|
|
132
|
+
if (!loop) return;
|
|
132
133
|
const rawX = position.get();
|
|
133
134
|
const totalWidth = 100 * count;
|
|
134
135
|
const standardPosition = modulus(rawX, totalWidth);
|
|
@@ -101,6 +101,7 @@ export const Swiper = forwardRef(staged((p, ref) => {
|
|
|
101
101
|
},
|
|
102
102
|
onRest: () => {
|
|
103
103
|
if (draggingRef.current) return;
|
|
104
|
+
if (!loop) return;
|
|
104
105
|
const rawX = position.get();
|
|
105
106
|
const totalWidth = 100 * count;
|
|
106
107
|
const standardPosition = modulus(rawX, totalWidth);
|
package/2x/package.json
CHANGED
|
@@ -16328,7 +16328,7 @@ const Stepper = (p) => {
|
|
|
16328
16328
|
if (!hasFocus) {
|
|
16329
16329
|
setInputValue(convertValueToText(value, props.digits));
|
|
16330
16330
|
}
|
|
16331
|
-
}, [value]);
|
|
16331
|
+
}, [value, props.digits]);
|
|
16332
16332
|
const handleInputChange = (v) => {
|
|
16333
16333
|
setInputValue(v);
|
|
16334
16334
|
const value2 = convertTextToValue(v);
|
|
@@ -16756,6 +16756,8 @@ const Swiper = React$1.forwardRef(stagedComponents.staged((p, ref) => {
|
|
|
16756
16756
|
onRest: () => {
|
|
16757
16757
|
if (draggingRef.current)
|
|
16758
16758
|
return;
|
|
16759
|
+
if (!loop)
|
|
16760
|
+
return;
|
|
16759
16761
|
const rawX = position.get();
|
|
16760
16762
|
const totalWidth = 100 * count;
|
|
16761
16763
|
const standardPosition = modulus(rawX, totalWidth);
|
package/bundle/antd-mobile.es.js
CHANGED
|
@@ -16318,7 +16318,7 @@ const Stepper = (p) => {
|
|
|
16318
16318
|
if (!hasFocus) {
|
|
16319
16319
|
setInputValue(convertValueToText(value, props.digits));
|
|
16320
16320
|
}
|
|
16321
|
-
}, [value]);
|
|
16321
|
+
}, [value, props.digits]);
|
|
16322
16322
|
const handleInputChange = (v) => {
|
|
16323
16323
|
setInputValue(v);
|
|
16324
16324
|
const value2 = convertTextToValue(v);
|
|
@@ -16746,6 +16746,8 @@ const Swiper = forwardRef(staged((p, ref) => {
|
|
|
16746
16746
|
onRest: () => {
|
|
16747
16747
|
if (draggingRef.current)
|
|
16748
16748
|
return;
|
|
16749
|
+
if (!loop)
|
|
16750
|
+
return;
|
|
16749
16751
|
const rawX = position.get();
|
|
16750
16752
|
const totalWidth = 100 * count;
|
|
16751
16753
|
const standardPosition = modulus(rawX, totalWidth);
|
|
@@ -129,6 +129,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
129
129
|
},
|
|
130
130
|
onRest: () => {
|
|
131
131
|
if (draggingRef.current) return;
|
|
132
|
+
if (!loop) return;
|
|
132
133
|
const rawX = position.get();
|
|
133
134
|
const totalWidth = 100 * count;
|
|
134
135
|
const standardPosition = modulus(rawX, totalWidth);
|
|
@@ -101,6 +101,7 @@ export const Swiper = forwardRef(staged((p, ref) => {
|
|
|
101
101
|
},
|
|
102
102
|
onRest: () => {
|
|
103
103
|
if (draggingRef.current) return;
|
|
104
|
+
if (!loop) return;
|
|
104
105
|
const rawX = position.get();
|
|
105
106
|
const totalWidth = 100 * count;
|
|
106
107
|
const standardPosition = modulus(rawX, totalWidth);
|