assui 3.2.54 → 3.2.56
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 +8 -5
- package/es/single-img-upload/style/index.css +11 -1
- package/es/single-img-upload/style/index.less +13 -1
- package/lib/single-img-upload/index.d.ts +2 -0
- package/lib/single-img-upload/index.js +8 -5
- package/lib/single-img-upload/style/index.css +11 -1
- package/lib/single-img-upload/style/index.less +13 -1
- package/package.json +3 -3
- package/es/single-img-upload/assets/pdf.png +0 -0
- package/lib/single-img-upload/assets/pdf.png +0 -0
|
@@ -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;
|
|
@@ -166,9 +166,9 @@ import Image from "antd/es/image";
|
|
|
166
166
|
import Spin from "antd/es/spin";
|
|
167
167
|
import classNames from 'classnames';
|
|
168
168
|
import CloseOutlined from "a-icons/es/CloseOutlined";
|
|
169
|
+
import Pdf from "a-icons/es/Pdf";
|
|
169
170
|
import isObject from 'lodash/isObject';
|
|
170
171
|
import isFunction from 'lodash/isFunction';
|
|
171
|
-
var pdfpng = "pdf.png";
|
|
172
172
|
var getLocalImgURL = function getLocalImgURL(file) {
|
|
173
173
|
var URL = window.URL || window.webkitURL;
|
|
174
174
|
var imgURL = URL.createObjectURL(file);
|
|
@@ -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,9 +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
|
-
|
|
326
|
-
})
|
|
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)));
|
|
327
330
|
};
|
|
328
331
|
return /*#__PURE__*/React.createElement("div", {
|
|
329
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
|
-
.as-img-upload .as-img-upload-pdf-preview
|
|
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;
|
|
@@ -207,9 +207,9 @@ var image_1 = __importDefault(require("antd/lib/image"));
|
|
|
207
207
|
var spin_1 = __importDefault(require("antd/lib/spin"));
|
|
208
208
|
var classnames_1 = __importDefault(require("classnames"));
|
|
209
209
|
var CloseOutlined_1 = __importDefault(require("a-icons/lib/CloseOutlined"));
|
|
210
|
+
var Pdf_1 = __importDefault(require("a-icons/lib/Pdf"));
|
|
210
211
|
var isObject_1 = __importDefault(require("lodash/isObject"));
|
|
211
212
|
var isFunction_1 = __importDefault(require("lodash/isFunction"));
|
|
212
|
-
var pdf_png_1 = __importDefault("pdf.png");
|
|
213
213
|
var getLocalImgURL = function getLocalImgURL(file) {
|
|
214
214
|
var URL = window.URL || window.webkitURL;
|
|
215
215
|
var imgURL = URL.createObjectURL(file);
|
|
@@ -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,9 +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
|
-
|
|
367
|
-
})
|
|
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)));
|
|
368
371
|
};
|
|
369
372
|
return React.createElement("div", {
|
|
370
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
|
-
.as-img-upload .as-img-upload-pdf-preview
|
|
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.56",
|
|
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.40",
|
|
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": "99e5f293ea3616e42b2ecd07c10c5a6a7445c7f9"
|
|
90
90
|
}
|
|
Binary file
|
|
Binary file
|