antd-mobile 5.31.0 → 5.31.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/bundle/antd-mobile.cjs.development.js +2 -2
- package/2x/bundle/antd-mobile.cjs.js +2 -2
- package/2x/bundle/antd-mobile.es.development.js +2 -2
- package/2x/bundle/antd-mobile.es.js +2 -2
- package/2x/bundle/antd-mobile.umd.development.js +2 -2
- package/2x/bundle/antd-mobile.umd.js +2 -2
- package/2x/bundle/style.css +2 -0
- package/2x/cjs/components/form/form-subscribe.js +1 -1
- package/2x/cjs/components/notice-bar/notice-bar.css +2 -0
- package/2x/cjs/components/swiper/swiper.js +1 -1
- package/2x/es/components/form/form-subscribe.js +1 -1
- package/2x/es/components/notice-bar/notice-bar.css +2 -0
- package/2x/es/components/swiper/swiper.js +1 -1
- package/2x/package.json +1 -1
- package/bundle/antd-mobile.cjs.development.js +2 -2
- package/bundle/antd-mobile.cjs.js +2 -2
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +2 -2
- package/bundle/antd-mobile.es.js +2 -2
- package/bundle/antd-mobile.umd.development.js +2 -2
- package/bundle/antd-mobile.umd.js +2 -2
- package/bundle/style.css +1 -1
- package/cjs/components/form/form-subscribe.js +1 -1
- package/cjs/components/notice-bar/notice-bar.css +2 -0
- package/cjs/components/swiper/swiper.js +1 -1
- package/es/components/form/form-subscribe.js +1 -1
- package/es/components/notice-bar/notice-bar.css +2 -0
- package/es/components/swiper/swiper.js +1 -1
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
package/2x/bundle/style.css
CHANGED
|
@@ -15,7 +15,7 @@ const FormSubscribe = props => {
|
|
|
15
15
|
const form = (0, _react.useContext)(_rcFieldForm.FieldContext);
|
|
16
16
|
const value = form.getFieldsValue(props.to);
|
|
17
17
|
// Memo to avoid useless render
|
|
18
|
-
const childNode = _react.default.useMemo(() => props.children(value, form), [JSON.stringify(value)]);
|
|
18
|
+
const childNode = _react.default.useMemo(() => props.children(value, form), [JSON.stringify(value), props.children]);
|
|
19
19
|
return _react.default.createElement(_react.default.Fragment, null, childNode, props.to.map(namePath => _react.default.createElement(Watcher, {
|
|
20
20
|
key: namePath.toString(),
|
|
21
21
|
form: form,
|
|
@@ -181,10 +181,10 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
181
181
|
var _a;
|
|
182
182
|
const roundedIndex = Math.round(index);
|
|
183
183
|
const targetIndex = loop ? modulus(roundedIndex, count) : (0, _bound.bound)(roundedIndex, 0, count - 1);
|
|
184
|
-
setCurrent(targetIndex);
|
|
185
184
|
if (targetIndex !== getCurrent()) {
|
|
186
185
|
(_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, targetIndex);
|
|
187
186
|
}
|
|
187
|
+
setCurrent(targetIndex);
|
|
188
188
|
api.start({
|
|
189
189
|
position: (loop ? roundedIndex : boundIndex(roundedIndex)) * 100,
|
|
190
190
|
immediate
|
|
@@ -7,7 +7,7 @@ export const FormSubscribe = props => {
|
|
|
7
7
|
const form = useContext(FieldContext);
|
|
8
8
|
const value = form.getFieldsValue(props.to);
|
|
9
9
|
// Memo to avoid useless render
|
|
10
|
-
const childNode = React.useMemo(() => props.children(value, form), [JSON.stringify(value)]);
|
|
10
|
+
const childNode = React.useMemo(() => props.children(value, form), [JSON.stringify(value), props.children]);
|
|
11
11
|
return React.createElement(React.Fragment, null, childNode, props.to.map(namePath => React.createElement(Watcher, {
|
|
12
12
|
key: namePath.toString(),
|
|
13
13
|
form: form,
|
|
@@ -172,10 +172,10 @@ export const Swiper = forwardRef(staged((p, ref) => {
|
|
|
172
172
|
var _a;
|
|
173
173
|
const roundedIndex = Math.round(index);
|
|
174
174
|
const targetIndex = loop ? modulus(roundedIndex, count) : bound(roundedIndex, 0, count - 1);
|
|
175
|
-
setCurrent(targetIndex);
|
|
176
175
|
if (targetIndex !== getCurrent()) {
|
|
177
176
|
(_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, targetIndex);
|
|
178
177
|
}
|
|
178
|
+
setCurrent(targetIndex);
|
|
179
179
|
api.start({
|
|
180
180
|
position: (loop ? roundedIndex : boundIndex(roundedIndex)) * 100,
|
|
181
181
|
immediate
|
package/2x/package.json
CHANGED
|
@@ -20834,7 +20834,7 @@ const FormSubscribe = (props) => {
|
|
|
20834
20834
|
const update2 = useUpdate$1();
|
|
20835
20835
|
const form = React$4.useContext(Context$1);
|
|
20836
20836
|
const value = form.getFieldsValue(props.to);
|
|
20837
|
-
const childNode = React__default.default.useMemo(() => props.children(value, form), [JSON.stringify(value)]);
|
|
20837
|
+
const childNode = React__default.default.useMemo(() => props.children(value, form), [JSON.stringify(value), props.children]);
|
|
20838
20838
|
return React__default.default.createElement(React__default.default.Fragment, null, childNode, props.to.map((namePath) => React__default.default.createElement(Watcher, {
|
|
20839
20839
|
key: namePath.toString(),
|
|
20840
20840
|
form,
|
|
@@ -25130,10 +25130,10 @@ const Swiper = React$4.forwardRef(staged_1((p, ref) => {
|
|
|
25130
25130
|
var _a;
|
|
25131
25131
|
const roundedIndex = Math.round(index2);
|
|
25132
25132
|
const targetIndex = loop2 ? modulus(roundedIndex, count) : bound(roundedIndex, 0, count - 1);
|
|
25133
|
-
setCurrent(targetIndex);
|
|
25134
25133
|
if (targetIndex !== getCurrent()) {
|
|
25135
25134
|
(_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, targetIndex);
|
|
25136
25135
|
}
|
|
25136
|
+
setCurrent(targetIndex);
|
|
25137
25137
|
api.start({
|
|
25138
25138
|
position: (loop2 ? roundedIndex : boundIndex(roundedIndex)) * 100,
|
|
25139
25139
|
immediate
|