gxxc-ui 1.0.38 → 1.0.40
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/ModalUI/index.js +5 -4
- package/dist/UploadUI/index.js +8 -4
- package/package.json +2 -2
package/dist/ModalUI/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "isOpen", "setIsOpen", "title", "icon", "type", "confirm", "children"];
|
|
1
|
+
var _excluded = ["className", "isOpen", "setIsOpen", "title", "icon", "type", "titleClass", "confirm", "children"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -12,9 +12,9 @@ import React, { useRef, useState, Fragment } from 'react';
|
|
|
12
12
|
import { Modal } from 'antd';
|
|
13
13
|
import Draggable from 'react-draggable';
|
|
14
14
|
import "./index.scss";
|
|
15
|
-
var RenderTitle = function RenderTitle(title, icon, type) {
|
|
15
|
+
var RenderTitle = function RenderTitle(title, icon, type, className) {
|
|
16
16
|
return /*#__PURE__*/React.createElement(Fragment, null, (title || icon) && /*#__PURE__*/React.createElement("div", {
|
|
17
|
-
className: "sicModalui-header"
|
|
17
|
+
className: "sicModalui-header ".concat(className !== null && className !== void 0 ? className : '')
|
|
18
18
|
}, title && /*#__PURE__*/React.createElement("div", null, title), icon && /*#__PURE__*/React.createElement("div", {
|
|
19
19
|
className: "sicModalui-header-icon ".concat(type !== null && type !== void 0 ? type : '')
|
|
20
20
|
}, icon)));
|
|
@@ -26,6 +26,7 @@ var ModalUI = function ModalUI(props) {
|
|
|
26
26
|
title = props.title,
|
|
27
27
|
icon = props.icon,
|
|
28
28
|
type = props.type,
|
|
29
|
+
titleClass = props.titleClass,
|
|
29
30
|
confirm = props.confirm,
|
|
30
31
|
children = props.children,
|
|
31
32
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
@@ -75,7 +76,7 @@ var ModalUI = function ModalUI(props) {
|
|
|
75
76
|
onMouseOut: function onMouseOut() {
|
|
76
77
|
return setDisabled(true);
|
|
77
78
|
}
|
|
78
|
-
}, RenderTitle(title, icon, type)),
|
|
79
|
+
}, RenderTitle(title, icon, type, titleClass)),
|
|
79
80
|
onCancel: function onCancel() {
|
|
80
81
|
return setIsOpen(undefined);
|
|
81
82
|
},
|
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.40",
|
|
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",
|