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.
@@ -2996,6 +2996,8 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
2996
2996
  }
2997
2997
 
2998
2998
  .adm-notice-bar .adm-notice-bar-right {
2999
+ display: flex;
3000
+ align-items: center;
2999
3001
  flex-shrink: 0;
3000
3002
  margin-left: 24px;
3001
3003
  }
@@ -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,
@@ -67,6 +67,8 @@
67
67
  }
68
68
 
69
69
  .adm-notice-bar .adm-notice-bar-right {
70
+ display: flex;
71
+ align-items: center;
70
72
  flex-shrink: 0;
71
73
  margin-left: 24px;
72
74
  }
@@ -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,
@@ -67,6 +67,8 @@
67
67
  }
68
68
 
69
69
  .adm-notice-bar .adm-notice-bar-right {
70
+ display: flex;
71
+ align-items: center;
70
72
  flex-shrink: 0;
71
73
  margin-left: 24px;
72
74
  }
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-mobile",
3
- "version": "5.31.0",
3
+ "version": "5.31.1",
4
4
  "dependencies": {
5
5
  "@floating-ui/dom": "^1.2.6",
6
6
  "@rc-component/mini-decimal": "^1.1.0",
@@ -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