gxxc-ui 1.0.41 → 1.0.43
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 -3
- 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, file_url_is_image, getUrlConfig } from 'gxxc-util';
|
|
28
|
+
import { file_calculate_md5, file_url_is_image, file_url_is_video_H264, getUrlConfig } from 'gxxc-util';
|
|
29
29
|
import "./index.scss";
|
|
30
30
|
import { DraggerFileItems } from "./type";
|
|
31
31
|
// 文件名转义 后端解析地址需要排除部分符号
|
|
@@ -86,10 +86,15 @@ var UploadUI = function UploadUI(props) {
|
|
|
86
86
|
useEffect(function () {
|
|
87
87
|
var newFileList = (value === null || value === void 0 ? void 0 : value.map(function (item, index) {
|
|
88
88
|
var _getUrlConfig, _item$url;
|
|
89
|
-
|
|
89
|
+
var param = _objectSpread(_objectSpread({}, item), {}, {
|
|
90
90
|
uid: (item === null || item === void 0 ? void 0 : item.uid) || (item === null || item === void 0 ? void 0 : item.md5) || "temp_uid_".concat(Date.now(), "_").concat(index),
|
|
91
91
|
name: (item === null || item === void 0 ? void 0 : item.name) || ((_getUrlConfig = getUrlConfig((_item$url = item === null || item === void 0 ? void 0 : item.url) !== null && _item$url !== void 0 ? _item$url : '')) === null || _getUrlConfig === void 0 ? void 0 : _getUrlConfig.fileName) || "file_".concat(index + 1)
|
|
92
92
|
});
|
|
93
|
+
/// 如果是 h264 编码 显示第一帧
|
|
94
|
+
if (file_url_is_video_H264(param.url)) {
|
|
95
|
+
param.thumbUrl = "".concat(item.url, "?x-oss-process=video/snapshot,t_1000,f_jpg");
|
|
96
|
+
}
|
|
97
|
+
return param;
|
|
93
98
|
})) || [];
|
|
94
99
|
setFileList(newFileList);
|
|
95
100
|
}, [value]);
|
|
@@ -97,7 +102,7 @@ var UploadUI = function UploadUI(props) {
|
|
|
97
102
|
// 检查文件大小
|
|
98
103
|
var fileSize = ((file === null || file === void 0 ? void 0 : file.size) || 0) / 1024 / 1024;
|
|
99
104
|
if (maxSize && fileSize > maxSize) {
|
|
100
|
-
MessageUI.error("\u6587\u4EF6\u6700\u5927\u652F\u6301".concat(maxSize, "M\uFF0C\u8BF7\u4FEE\u6539\
|
|
105
|
+
MessageUI.error("\u6587\u4EF6\u6700\u5927\u652F\u6301".concat(maxSize, "M\uFF0C\u8BF7\u4FEE\u6539\u5927\u5C0F\u540E\u91CD\u8BD5\uFF01"));
|
|
101
106
|
return false;
|
|
102
107
|
} else {
|
|
103
108
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gxxc-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.43",
|
|
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.19"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@commitlint/cli": "^17.1.2",
|