antd-mobile 5.42.0-alpha.2 → 5.42.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 +7 -4
- package/2x/bundle/antd-mobile.cjs.js +5 -5
- package/2x/bundle/antd-mobile.es.development.js +7 -4
- package/2x/bundle/antd-mobile.es.js +537 -533
- package/2x/bundle/antd-mobile.umd.development.js +7 -4
- package/2x/bundle/antd-mobile.umd.js +5 -5
- package/2x/bundle/style.css +1 -1
- package/2x/cjs/components/image-uploader/image-uploader.js +2 -2
- package/2x/cjs/components/number-keyboard/number-keyboard.js +5 -1
- package/2x/cjs/components/virtual-input/virtual-input.css +1 -1
- package/2x/cjs/components/virtual-input/virtual-input.js +1 -1
- package/2x/es/components/image-uploader/image-uploader.js +2 -2
- package/2x/es/components/number-keyboard/number-keyboard.js +5 -1
- package/2x/es/components/virtual-input/virtual-input.css +1 -1
- package/2x/es/components/virtual-input/virtual-input.js +1 -1
- package/2x/package.json +1 -1
- package/bundle/antd-mobile.cjs.development.js +7 -4
- package/bundle/antd-mobile.cjs.js +5 -5
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +7 -4
- package/bundle/antd-mobile.es.js +537 -533
- package/bundle/antd-mobile.umd.development.js +7 -4
- package/bundle/antd-mobile.umd.js +5 -5
- package/bundle/style.css +1 -1
- package/cjs/components/image-uploader/image-uploader.js +2 -2
- package/cjs/components/number-keyboard/number-keyboard.js +5 -1
- package/cjs/components/virtual-input/virtual-input.css +1 -1
- package/cjs/components/virtual-input/virtual-input.js +1 -1
- package/es/components/image-uploader/image-uploader.js +2 -2
- package/es/components/number-keyboard/number-keyboard.js +5 -1
- package/es/components/virtual-input/virtual-input.css +1 -1
- package/es/components/virtual-input/virtual-input.js +1 -1
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -22169,6 +22169,7 @@ const ImageUploader = React$3.forwardRef((p, ref2) => {
|
|
|
22169
22169
|
function getFinalTasks(tasks2) {
|
|
22170
22170
|
return props.showFailed ? tasks2 : tasks2.filter((task) => task.status !== "fail");
|
|
22171
22171
|
}
|
|
22172
|
+
const finalTasks = getFinalTasks(tasks);
|
|
22172
22173
|
function onChange(e2) {
|
|
22173
22174
|
var _a;
|
|
22174
22175
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -22190,7 +22191,7 @@ const ImageUploader = React$3.forwardRef((p, ref2) => {
|
|
|
22190
22191
|
return;
|
|
22191
22192
|
}
|
|
22192
22193
|
if (maxCount > 0) {
|
|
22193
|
-
const exceed = value.length + files.length - maxCount;
|
|
22194
|
+
const exceed = value.length + files.length + finalTasks.length - maxCount;
|
|
22194
22195
|
if (exceed > 0) {
|
|
22195
22196
|
files = files.slice(0, files.length - exceed);
|
|
22196
22197
|
(_a = props.onCountExceed) === null || _a === void 0 ? void 0 : _a.call(props, exceed);
|
|
@@ -22249,7 +22250,6 @@ const ImageUploader = React$3.forwardRef((p, ref2) => {
|
|
|
22249
22250
|
var _a;
|
|
22250
22251
|
(_a = imageViewerHandlerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
22251
22252
|
});
|
|
22252
|
-
const finalTasks = getFinalTasks(tasks);
|
|
22253
22253
|
const showUpload = props.showUpload && (maxCount === 0 || value.length + finalTasks.length < maxCount);
|
|
22254
22254
|
const renderImages = () => {
|
|
22255
22255
|
return value.map((fileItem, index2) => {
|
|
@@ -23304,7 +23304,10 @@ const NumberKeyboard = (p) => {
|
|
|
23304
23304
|
forceRender: props.forceRender
|
|
23305
23305
|
}, withNativeProps(props, React$3.createElement("div", {
|
|
23306
23306
|
ref: keyboardRef,
|
|
23307
|
-
className: classPrefix$x
|
|
23307
|
+
className: classPrefix$x,
|
|
23308
|
+
onMouseDown: (e2) => {
|
|
23309
|
+
e2.preventDefault();
|
|
23310
|
+
}
|
|
23308
23311
|
}, renderHeader(), React$3.createElement("div", {
|
|
23309
23312
|
className: `${classPrefix$x}-wrapper`
|
|
23310
23313
|
}, React$3.createElement("div", {
|
|
@@ -27739,7 +27742,7 @@ const VirtualInput = React$3.forwardRef((props, ref2) => {
|
|
|
27739
27742
|
(_b = (_a = mergedProps.cursor) === null || _a === void 0 ? void 0 : _a.onMove) === null || _b === void 0 ? void 0 : _b.call(_a, value.length);
|
|
27740
27743
|
}
|
|
27741
27744
|
(_c = mergedProps.onClick) === null || _c === void 0 ? void 0 : _c.call(mergedProps, e2);
|
|
27742
|
-
|
|
27745
|
+
setFocus();
|
|
27743
27746
|
};
|
|
27744
27747
|
const changeCaretPosition = (index2) => (e2) => {
|
|
27745
27748
|
var _a, _b, _c;
|