gxxc-ui 1.0.39 → 1.0.41
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/dist/UploadUI/index.js +8 -4
- package/package.json +2 -2
package/dist/UploadUI/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import { DownloadOutlined, RotateLeftOutlined, RotateRightOutlined, SwapOutlined
|
|
|
25
25
|
import { Image, Space, Upload } from 'antd';
|
|
26
26
|
import React, { useEffect, useState } from 'react';
|
|
27
27
|
import { IconUI, MessageUI } from "./..";
|
|
28
|
-
import { file_calculate_md5, getUrlConfig } from 'gxxc-util';
|
|
28
|
+
import { file_calculate_md5, file_url_is_image, getUrlConfig } from 'gxxc-util';
|
|
29
29
|
import "./index.scss";
|
|
30
30
|
import { DraggerFileItems } from "./type";
|
|
31
31
|
// 文件名转义 后端解析地址需要排除部分符号
|
|
@@ -218,9 +218,13 @@ var UploadUI = function UploadUI(props) {
|
|
|
218
218
|
case 3:
|
|
219
219
|
file.preview = _context2.sent;
|
|
220
220
|
case 4:
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
if (file_url_is_image(file.url)) {
|
|
222
|
+
setPreviewImage(file.url || file.preview);
|
|
223
|
+
setPreviewOpen(true);
|
|
224
|
+
} else {
|
|
225
|
+
open(file.url);
|
|
226
|
+
}
|
|
227
|
+
case 5:
|
|
224
228
|
case "end":
|
|
225
229
|
return _context2.stop();
|
|
226
230
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gxxc-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.41",
|
|
4
4
|
"description": "A react library developed with dumi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"react-countup": "^6.5.3",
|
|
55
55
|
"react-draggable": "^4.4.6",
|
|
56
56
|
"react-router-dom": "^6.13.0",
|
|
57
|
-
"gxxc-util": "^1.0.
|
|
57
|
+
"gxxc-util": "^1.0.18"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@commitlint/cli": "^17.1.2",
|