antd-mobile 5.42.0-alpha.2 → 5.42.0

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.
Files changed (30) hide show
  1. package/2x/bundle/antd-mobile.cjs.development.js +3 -3
  2. package/2x/bundle/antd-mobile.cjs.js +5 -5
  3. package/2x/bundle/antd-mobile.es.development.js +3 -3
  4. package/2x/bundle/antd-mobile.es.js +533 -532
  5. package/2x/bundle/antd-mobile.umd.development.js +3 -3
  6. package/2x/bundle/antd-mobile.umd.js +5 -5
  7. package/2x/bundle/style.css +1 -1
  8. package/2x/cjs/components/image-uploader/image-uploader.js +2 -2
  9. package/2x/cjs/components/virtual-input/virtual-input.css +1 -1
  10. package/2x/cjs/components/virtual-input/virtual-input.js +1 -1
  11. package/2x/es/components/image-uploader/image-uploader.js +2 -2
  12. package/2x/es/components/virtual-input/virtual-input.css +1 -1
  13. package/2x/es/components/virtual-input/virtual-input.js +1 -1
  14. package/2x/package.json +1 -1
  15. package/bundle/antd-mobile.cjs.development.js +3 -3
  16. package/bundle/antd-mobile.cjs.js +5 -5
  17. package/bundle/antd-mobile.compatible.umd.js +1 -1
  18. package/bundle/antd-mobile.es.development.js +3 -3
  19. package/bundle/antd-mobile.es.js +533 -532
  20. package/bundle/antd-mobile.umd.development.js +3 -3
  21. package/bundle/antd-mobile.umd.js +5 -5
  22. package/bundle/style.css +1 -1
  23. package/cjs/components/image-uploader/image-uploader.js +2 -2
  24. package/cjs/components/virtual-input/virtual-input.css +1 -1
  25. package/cjs/components/virtual-input/virtual-input.js +1 -1
  26. package/es/components/image-uploader/image-uploader.js +2 -2
  27. package/es/components/virtual-input/virtual-input.css +1 -1
  28. package/es/components/virtual-input/virtual-input.js +1 -1
  29. package/package.json +1 -1
  30. package/umd/antd-mobile.js +1 -1
@@ -22151,6 +22151,7 @@ const ImageUploader = forwardRef((p, ref2) => {
22151
22151
  function getFinalTasks(tasks2) {
22152
22152
  return props.showFailed ? tasks2 : tasks2.filter((task) => task.status !== "fail");
22153
22153
  }
22154
+ const finalTasks = getFinalTasks(tasks);
22154
22155
  function onChange(e2) {
22155
22156
  var _a;
22156
22157
  return __awaiter(this, void 0, void 0, function* () {
@@ -22172,7 +22173,7 @@ const ImageUploader = forwardRef((p, ref2) => {
22172
22173
  return;
22173
22174
  }
22174
22175
  if (maxCount > 0) {
22175
- const exceed = value.length + files.length - maxCount;
22176
+ const exceed = value.length + files.length + finalTasks.length - maxCount;
22176
22177
  if (exceed > 0) {
22177
22178
  files = files.slice(0, files.length - exceed);
22178
22179
  (_a = props.onCountExceed) === null || _a === void 0 ? void 0 : _a.call(props, exceed);
@@ -22231,7 +22232,6 @@ const ImageUploader = forwardRef((p, ref2) => {
22231
22232
  var _a;
22232
22233
  (_a = imageViewerHandlerRef.current) === null || _a === void 0 ? void 0 : _a.close();
22233
22234
  });
22234
- const finalTasks = getFinalTasks(tasks);
22235
22235
  const showUpload = props.showUpload && (maxCount === 0 || value.length + finalTasks.length < maxCount);
22236
22236
  const renderImages = () => {
22237
22237
  return value.map((fileItem, index2) => {
@@ -27721,7 +27721,7 @@ const VirtualInput = forwardRef((props, ref2) => {
27721
27721
  (_b = (_a = mergedProps.cursor) === null || _a === void 0 ? void 0 : _a.onMove) === null || _b === void 0 ? void 0 : _b.call(_a, value.length);
27722
27722
  }
27723
27723
  (_c = mergedProps.onClick) === null || _c === void 0 ? void 0 : _c.call(mergedProps, e2);
27724
- setHasFocus(true);
27724
+ setFocus();
27725
27725
  };
27726
27726
  const changeCaretPosition = (index2) => (e2) => {
27727
27727
  var _a, _b, _c;