assui 2.1.12 → 2.1.15
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/es/single-img-upload/index.d.ts +1 -0
- package/es/single-img-upload/index.js +6 -4
- package/es/single-img-upload/style/index.css +5 -0
- package/es/single-img-upload/style/index.less +6 -0
- package/lib/single-img-upload/index.d.ts +1 -0
- package/lib/single-img-upload/index.js +6 -4
- package/lib/single-img-upload/style/index.css +5 -0
- package/lib/single-img-upload/style/index.less +6 -0
- package/package.json +2 -2
|
@@ -233,10 +233,11 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
233
233
|
onDeleteUpload = props.onDeleteUpload,
|
|
234
234
|
onFormatResData = props.onFormatResData,
|
|
235
235
|
onSuccess = props.onSuccess,
|
|
236
|
+
onCancel = props.onCancel,
|
|
236
237
|
beforeUpload = props.beforeUpload,
|
|
237
238
|
onError = props.onError,
|
|
238
239
|
disabled = props.disabled,
|
|
239
|
-
restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onFormatResData", "onSuccess", "beforeUpload", "onError", "disabled"]);
|
|
240
|
+
restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onFormatResData", "onSuccess", "onCancel", "beforeUpload", "onError", "disabled"]);
|
|
240
241
|
|
|
241
242
|
var uploadInstanceRef = React.useRef();
|
|
242
243
|
var fileRef = React.useRef();
|
|
@@ -348,6 +349,7 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
348
349
|
}
|
|
349
350
|
|
|
350
351
|
setUploadStatus('init');
|
|
352
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
351
353
|
};
|
|
352
354
|
|
|
353
355
|
var cls = classNames('as-img-upload', wrapperClassName);
|
|
@@ -355,10 +357,10 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
355
357
|
className: cls
|
|
356
358
|
}, uploadStatus === 'uploading' && /*#__PURE__*/React.createElement("div", {
|
|
357
359
|
className: "as-img-upload-content"
|
|
358
|
-
}, /*#__PURE__*/React.createElement(
|
|
359
|
-
|
|
360
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
361
|
+
wrapperClassName: "as-img-upload-preview",
|
|
360
362
|
src: fileUrl,
|
|
361
|
-
|
|
363
|
+
preview: true
|
|
362
364
|
}), /*#__PURE__*/React.createElement("div", {
|
|
363
365
|
className: "dark"
|
|
364
366
|
}), /*#__PURE__*/React.createElement(Progress, {
|
|
@@ -1837,7 +1837,12 @@ html {
|
|
|
1837
1837
|
height: 15px;
|
|
1838
1838
|
color: #fff;
|
|
1839
1839
|
}
|
|
1840
|
+
.as-img-upload .preview-img {
|
|
1841
|
+
max-width: 100%;
|
|
1842
|
+
}
|
|
1840
1843
|
.as-img-upload-preview {
|
|
1844
|
+
display: flex;
|
|
1845
|
+
align-items: center;
|
|
1841
1846
|
height: 100%;
|
|
1842
1847
|
}
|
|
1843
1848
|
.as-img-upload-upload-progress {
|
|
@@ -291,10 +291,11 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
291
291
|
onDeleteUpload = props.onDeleteUpload,
|
|
292
292
|
onFormatResData = props.onFormatResData,
|
|
293
293
|
onSuccess = props.onSuccess,
|
|
294
|
+
onCancel = props.onCancel,
|
|
294
295
|
beforeUpload = props.beforeUpload,
|
|
295
296
|
onError = props.onError,
|
|
296
297
|
disabled = props.disabled,
|
|
297
|
-
restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onFormatResData", "onSuccess", "beforeUpload", "onError", "disabled"]);
|
|
298
|
+
restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onFormatResData", "onSuccess", "onCancel", "beforeUpload", "onError", "disabled"]);
|
|
298
299
|
|
|
299
300
|
var uploadInstanceRef = React.useRef();
|
|
300
301
|
var fileRef = React.useRef();
|
|
@@ -406,6 +407,7 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
406
407
|
}
|
|
407
408
|
|
|
408
409
|
setUploadStatus('init');
|
|
410
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
409
411
|
};
|
|
410
412
|
|
|
411
413
|
var cls = (0, classnames_1["default"])('as-img-upload', wrapperClassName);
|
|
@@ -413,10 +415,10 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
413
415
|
className: cls
|
|
414
416
|
}, uploadStatus === 'uploading' && React.createElement("div", {
|
|
415
417
|
className: "as-img-upload-content"
|
|
416
|
-
}, React.createElement("
|
|
417
|
-
|
|
418
|
+
}, React.createElement(image_1["default"], {
|
|
419
|
+
wrapperClassName: "as-img-upload-preview",
|
|
418
420
|
src: fileUrl,
|
|
419
|
-
|
|
421
|
+
preview: true
|
|
420
422
|
}), React.createElement("div", {
|
|
421
423
|
className: "dark"
|
|
422
424
|
}), React.createElement(progress_1["default"], {
|
|
@@ -1837,7 +1837,12 @@ html {
|
|
|
1837
1837
|
height: 15px;
|
|
1838
1838
|
color: #fff;
|
|
1839
1839
|
}
|
|
1840
|
+
.as-img-upload .preview-img {
|
|
1841
|
+
max-width: 100%;
|
|
1842
|
+
}
|
|
1840
1843
|
.as-img-upload-preview {
|
|
1844
|
+
display: flex;
|
|
1845
|
+
align-items: center;
|
|
1841
1846
|
height: 100%;
|
|
1842
1847
|
}
|
|
1843
1848
|
.as-img-upload-upload-progress {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.15",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"node": ">=10.0.0"
|
|
71
71
|
},
|
|
72
72
|
"license": "MIT",
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "4c2c589443e0a0a217ca42e6a8f04d2799aa2886"
|
|
74
74
|
}
|