assui 3.2.55 → 3.2.57
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 +2 -0
- package/es/single-img-upload/index.js +7 -2
- package/es/single-img-upload/style/index.css +10 -0
- package/es/single-img-upload/style/index.less +12 -0
- package/lib/single-img-upload/index.d.ts +2 -0
- package/lib/single-img-upload/index.js +7 -2
- package/lib/single-img-upload/style/index.css +10 -0
- package/lib/single-img-upload/style/index.less +12 -0
- package/package.json +3 -3
|
@@ -12,6 +12,8 @@ export interface SingleImgUploadProps extends UploadProps {
|
|
|
12
12
|
onCancel?: () => void;
|
|
13
13
|
/** 格式化接口返回数据 */
|
|
14
14
|
onFormatResData?: (res: any) => string;
|
|
15
|
+
/** pdf名称 */
|
|
16
|
+
pdfName?: string;
|
|
15
17
|
}
|
|
16
18
|
declare const SingleImgUpload: (props: SingleImgUploadProps) => JSX.Element;
|
|
17
19
|
export default SingleImgUpload;
|
|
@@ -193,7 +193,8 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
193
193
|
beforeUpload = _a === void 0 ? initBeforeUpload : _a,
|
|
194
194
|
onError = props.onError,
|
|
195
195
|
disabled = props.disabled,
|
|
196
|
-
|
|
196
|
+
pdfName = props.pdfName,
|
|
197
|
+
restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onFormatResData", "onSuccess", "onCancel", "beforeUpload", "onError", "disabled", "pdfName"]);
|
|
197
198
|
var uploadInstanceRef = React.useRef();
|
|
198
199
|
var fileRef = React.useRef();
|
|
199
200
|
var _b = __read(React.useState(value ? 'done' : 'init'), 2),
|
|
@@ -321,7 +322,11 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
321
322
|
onClick: function onClick() {
|
|
322
323
|
return window.open(fileUrl || value, '_blank');
|
|
323
324
|
}
|
|
324
|
-
}, /*#__PURE__*/React.createElement(
|
|
325
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
326
|
+
className: "as-img-upload-pdf-preview-content"
|
|
327
|
+
}, /*#__PURE__*/React.createElement(Pdf, null), pdfName && /*#__PURE__*/React.createElement("div", {
|
|
328
|
+
className: "as-img-upload-pdf-name"
|
|
329
|
+
}, pdfName)));
|
|
325
330
|
};
|
|
326
331
|
return /*#__PURE__*/React.createElement("div", {
|
|
327
332
|
className: cls
|
|
@@ -1274,11 +1274,21 @@ html {
|
|
|
1274
1274
|
align-items: center;
|
|
1275
1275
|
justify-content: center;
|
|
1276
1276
|
cursor: pointer;
|
|
1277
|
+
text-align: center;
|
|
1277
1278
|
}
|
|
1278
1279
|
.as-img-upload .as-img-upload-pdf-preview .spotecicon {
|
|
1279
1280
|
width: 40px;
|
|
1280
1281
|
height: 40px;
|
|
1281
1282
|
}
|
|
1283
|
+
.as-img-upload .as-img-upload-pdf-preview .as-img-upload-pdf-preview-content {
|
|
1284
|
+
display: flex;
|
|
1285
|
+
flex-direction: column;
|
|
1286
|
+
align-items: center;
|
|
1287
|
+
justify-content: center;
|
|
1288
|
+
}
|
|
1289
|
+
.as-img-upload .as-img-upload-pdf-preview .as-img-upload-pdf-name {
|
|
1290
|
+
margin-top: 10px;
|
|
1291
|
+
}
|
|
1282
1292
|
.as-img-upload-close-button {
|
|
1283
1293
|
position: absolute;
|
|
1284
1294
|
top: 0;
|
|
@@ -48,11 +48,23 @@
|
|
|
48
48
|
align-items: center;
|
|
49
49
|
justify-content: center;
|
|
50
50
|
cursor: pointer;
|
|
51
|
+
text-align: center;
|
|
51
52
|
|
|
52
53
|
.spotecicon {
|
|
53
54
|
width: 40px;
|
|
54
55
|
height: 40px;
|
|
55
56
|
}
|
|
57
|
+
|
|
58
|
+
.as-img-upload-pdf-preview-content {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.as-img-upload-pdf-name {
|
|
66
|
+
margin-top: 10px;
|
|
67
|
+
}
|
|
56
68
|
}
|
|
57
69
|
|
|
58
70
|
&-close-button {
|
|
@@ -12,6 +12,8 @@ export interface SingleImgUploadProps extends UploadProps {
|
|
|
12
12
|
onCancel?: () => void;
|
|
13
13
|
/** 格式化接口返回数据 */
|
|
14
14
|
onFormatResData?: (res: any) => string;
|
|
15
|
+
/** pdf名称 */
|
|
16
|
+
pdfName?: string;
|
|
15
17
|
}
|
|
16
18
|
declare const SingleImgUpload: (props: SingleImgUploadProps) => JSX.Element;
|
|
17
19
|
export default SingleImgUpload;
|
|
@@ -234,7 +234,8 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
234
234
|
beforeUpload = _a === void 0 ? initBeforeUpload : _a,
|
|
235
235
|
onError = props.onError,
|
|
236
236
|
disabled = props.disabled,
|
|
237
|
-
|
|
237
|
+
pdfName = props.pdfName,
|
|
238
|
+
restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onFormatResData", "onSuccess", "onCancel", "beforeUpload", "onError", "disabled", "pdfName"]);
|
|
238
239
|
var uploadInstanceRef = React.useRef();
|
|
239
240
|
var fileRef = React.useRef();
|
|
240
241
|
var _b = __read(React.useState(value ? 'done' : 'init'), 2),
|
|
@@ -362,7 +363,11 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
362
363
|
onClick: function onClick() {
|
|
363
364
|
return window.open(fileUrl || value, '_blank');
|
|
364
365
|
}
|
|
365
|
-
}, React.createElement(
|
|
366
|
+
}, React.createElement("div", {
|
|
367
|
+
className: "as-img-upload-pdf-preview-content"
|
|
368
|
+
}, React.createElement(Pdf_1["default"], null), pdfName && React.createElement("div", {
|
|
369
|
+
className: "as-img-upload-pdf-name"
|
|
370
|
+
}, pdfName)));
|
|
366
371
|
};
|
|
367
372
|
return React.createElement("div", {
|
|
368
373
|
className: cls
|
|
@@ -1274,11 +1274,21 @@ html {
|
|
|
1274
1274
|
align-items: center;
|
|
1275
1275
|
justify-content: center;
|
|
1276
1276
|
cursor: pointer;
|
|
1277
|
+
text-align: center;
|
|
1277
1278
|
}
|
|
1278
1279
|
.as-img-upload .as-img-upload-pdf-preview .spotecicon {
|
|
1279
1280
|
width: 40px;
|
|
1280
1281
|
height: 40px;
|
|
1281
1282
|
}
|
|
1283
|
+
.as-img-upload .as-img-upload-pdf-preview .as-img-upload-pdf-preview-content {
|
|
1284
|
+
display: flex;
|
|
1285
|
+
flex-direction: column;
|
|
1286
|
+
align-items: center;
|
|
1287
|
+
justify-content: center;
|
|
1288
|
+
}
|
|
1289
|
+
.as-img-upload .as-img-upload-pdf-preview .as-img-upload-pdf-name {
|
|
1290
|
+
margin-top: 10px;
|
|
1291
|
+
}
|
|
1282
1292
|
.as-img-upload-close-button {
|
|
1283
1293
|
position: absolute;
|
|
1284
1294
|
top: 0;
|
|
@@ -48,11 +48,23 @@
|
|
|
48
48
|
align-items: center;
|
|
49
49
|
justify-content: center;
|
|
50
50
|
cursor: pointer;
|
|
51
|
+
text-align: center;
|
|
51
52
|
|
|
52
53
|
.spotecicon {
|
|
53
54
|
width: 40px;
|
|
54
55
|
height: 40px;
|
|
55
56
|
}
|
|
57
|
+
|
|
58
|
+
.as-img-upload-pdf-preview-content {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.as-img-upload-pdf-name {
|
|
66
|
+
margin-top: 10px;
|
|
67
|
+
}
|
|
56
68
|
}
|
|
57
69
|
|
|
58
70
|
&-close-button {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.57",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/react-beautiful-dnd": "^13.1.2",
|
|
36
36
|
"@types/react-color": "^3.0.6",
|
|
37
37
|
"@types/react-resizable": "^3.0.0",
|
|
38
|
-
"a-icons": "^1.2.
|
|
38
|
+
"a-icons": "^1.2.41",
|
|
39
39
|
"aa-utils": "^2.1.31",
|
|
40
40
|
"ahooks": "^3.9.5",
|
|
41
41
|
"bignumber.js": "^9.0.1",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"node": ">=10.0.0"
|
|
87
87
|
},
|
|
88
88
|
"license": "MIT",
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "b9363caa1f1a8ccbd8921742d489a8ce6362d1cb"
|
|
90
90
|
}
|