assui 3.2.55 → 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.
@@ -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
- restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onFormatResData", "onSuccess", "onCancel", "beforeUpload", "onError", "disabled"]);
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(Pdf, null));
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
- restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onFormatResData", "onSuccess", "onCancel", "beforeUpload", "onError", "disabled"]);
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(Pdf_1["default"], null));
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.55",
3
+ "version": "3.2.56",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -86,5 +86,5 @@
86
86
  "node": ">=10.0.0"
87
87
  },
88
88
  "license": "MIT",
89
- "gitHead": "19406cff4bfff93075dbf9f6ff9814fc934e9bbd"
89
+ "gitHead": "99e5f293ea3616e42b2ecd07c10c5a6a7445c7f9"
90
90
  }