zy-react-library 1.1.1 → 1.1.2
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/README.md +5 -1
- package/components/Cascader/Area/index.js +11 -11
- package/components/Cascader/Basic/index.js +23 -30
- package/components/Cascader/Dictionary/index.js +42 -42
- package/components/Cascader/Industry/index.js +12 -11
- package/components/Editor/index.js +43 -63
- package/components/FormBuilder/FormBuilder.js +97 -87
- package/components/FormBuilder/FormItemsRenderer.js +579 -581
- package/components/FormBuilder/index.js +5 -3
- package/components/HeaderBack/index.js +39 -32
- package/components/HiddenInfo/gwj/index.js +507 -439
- package/components/Icon/AddIcon/index.js +6 -6
- package/components/Icon/BackIcon/index.js +6 -6
- package/components/Icon/DeleteIcon/index.js +6 -6
- package/components/Icon/DownloadIcon/index.js +6 -6
- package/components/Icon/EditIcon/index.js +6 -6
- package/components/Icon/ExportIcon/index.js +6 -6
- package/components/Icon/ImportIcon/index.js +6 -6
- package/components/Icon/LocationIcon/index.js +6 -6
- package/components/Icon/PrintIcon/index.js +6 -6
- package/components/Icon/ResetIcon/index.js +6 -6
- package/components/Icon/SearchIcon/index.js +6 -6
- package/components/Icon/VideoIcon/index.js +6 -6
- package/components/Icon/ViewIcon/index.js +6 -6
- package/components/ImportFile/index.js +94 -91
- package/components/LeftTree/Area/index.js +15 -15
- package/components/LeftTree/Basic/index.js +54 -65
- package/components/LeftTree/Department/Gwj/index.js +29 -32
- package/components/LeftTree/Dictionary/index.js +42 -42
- package/components/Map/MapSelector.js +280 -254
- package/components/Map/index.js +90 -77
- package/components/Page/index.js +43 -34
- package/components/Pdf/index.js +92 -90
- package/components/PreviewImg/index.js +26 -32
- package/components/PreviewPdf/index.js +78 -86
- package/components/Search/index.js +147 -141
- package/components/Select/Basic/index.js +70 -76
- package/components/Select/Dictionary/index.js +42 -42
- package/components/Select/Personnel/Gwj/index.js +45 -49
- package/components/SelectCreate/index.js +33 -40
- package/components/SelectTree/Area/index.js +11 -17
- package/components/SelectTree/Basic/index.js +105 -102
- package/components/SelectTree/Department/Gwj/index.js +40 -46
- package/components/SelectTree/Dictionary/index.js +42 -42
- package/components/SelectTree/HiddenLevel/Gwj/index.js +33 -35
- package/components/SelectTree/HiddenPart/Gwj/index.js +16 -19
- package/components/SelectTree/Industry/index.js +12 -18
- package/components/Signature/index.js +68 -62
- package/components/Table/index.js +77 -73
- package/components/Table/index.less +7 -1
- package/components/TooltipPreviewImg/index.js +28 -27
- package/components/Upload/index.js +229 -275
- package/components/Video/AliPlayer.js +182 -160
- package/components/Video/index.js +71 -90
- package/css/common.less +4 -0
- package/enum/dictionary/index.js +5 -3
- package/enum/formItemRender/index.js +37 -35
- package/enum/hidden/gwj/index.js +65 -26
- package/enum/uploadFile/gwj/index.js +166 -84
- package/hooks/useDeleteFile/index.js +24 -30
- package/hooks/useDictionary/index.js +28 -30
- package/hooks/useDownloadBlob/index.js +78 -77
- package/hooks/useDownloadFile/index.js +76 -79
- package/hooks/useGetFile/index.js +32 -32
- package/hooks/useGetUrlQuery/index.js +1 -2
- package/hooks/useGetUserInfo/index.js +19 -26
- package/hooks/useIdle/index.js +9 -11
- package/hooks/useImportFile/index.js +30 -28
- package/hooks/useIsExistenceDuplicateSelection/index.js +25 -18
- package/hooks/useTable/index.js +49 -38
- package/hooks/useUploadFile/index.js +142 -147
- package/hooks/useUrlQueryCriteria/index.js +20 -13
- package/package.json +14 -1
- package/regular/index.js +34 -39
- package/utils/index.js +515 -511
package/components/Map/index.js
CHANGED
|
@@ -1,77 +1,90 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState } from
|
|
3
|
-
import MapSelector from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
1
|
+
import { Form, Row, Col, Input, Button } from 'antd';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import MapSelector from './MapSelector.js';
|
|
4
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
const Map = props => {
|
|
7
|
+
const {
|
|
8
|
+
longitudeProps = "longitude",
|
|
9
|
+
latitudeProps = "latitude",
|
|
10
|
+
onConfirm,
|
|
11
|
+
required = true,
|
|
12
|
+
area = "",
|
|
13
|
+
showArea = false
|
|
14
|
+
} = props;
|
|
15
|
+
const form = Form.useFormInstance();
|
|
16
|
+
const [mapVisible, setMapVisible] = useState(false);
|
|
17
|
+
const [currentLongitude, setCurrentLongitude] = useState("");
|
|
18
|
+
const [currentLatitude, setCurrentLatitude] = useState("");
|
|
19
|
+
const handleMapConfirm = (longitudeValue, latitudeValue, extra) => {
|
|
20
|
+
setCurrentLongitude(longitudeValue);
|
|
21
|
+
setCurrentLatitude(latitudeValue);
|
|
22
|
+
form.setFieldsValue({
|
|
23
|
+
[longitudeProps]: longitudeValue,
|
|
24
|
+
[latitudeProps]: latitudeValue
|
|
25
|
+
});
|
|
26
|
+
onConfirm?.(longitudeValue, latitudeValue, extra);
|
|
27
|
+
setMapVisible(false);
|
|
28
|
+
};
|
|
29
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
30
|
+
children: [/*#__PURE__*/jsxs(Row, {
|
|
31
|
+
gutter: 24,
|
|
32
|
+
children: [/*#__PURE__*/jsx(Col, {
|
|
33
|
+
span: 12,
|
|
34
|
+
children: /*#__PURE__*/jsx(Form.Item, {
|
|
35
|
+
label: "\u7ECF\u5EA6",
|
|
36
|
+
name: longitudeProps,
|
|
37
|
+
rules: [{
|
|
38
|
+
required,
|
|
39
|
+
message: "请选择经度"
|
|
40
|
+
}],
|
|
41
|
+
children: /*#__PURE__*/jsx(Input, {
|
|
42
|
+
disabled: true
|
|
43
|
+
})
|
|
44
|
+
})
|
|
45
|
+
}), /*#__PURE__*/jsx(Col, {
|
|
46
|
+
span: 12,
|
|
47
|
+
children: /*#__PURE__*/jsx(Form.Item, {
|
|
48
|
+
label: "\u7EAC\u5EA6",
|
|
49
|
+
required: required,
|
|
50
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
51
|
+
style: {
|
|
52
|
+
display: "flex",
|
|
53
|
+
gap: 10
|
|
54
|
+
},
|
|
55
|
+
children: [/*#__PURE__*/jsx(Form.Item, {
|
|
56
|
+
name: latitudeProps,
|
|
57
|
+
noStyle: true,
|
|
58
|
+
rules: [{
|
|
59
|
+
required,
|
|
60
|
+
message: "请选择纬度"
|
|
61
|
+
}],
|
|
62
|
+
children: /*#__PURE__*/jsx(Input, {
|
|
63
|
+
disabled: true
|
|
64
|
+
})
|
|
65
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
66
|
+
type: "primary",
|
|
67
|
+
onClick: () => {
|
|
68
|
+
setMapVisible(true);
|
|
69
|
+
setCurrentLongitude(form.getFieldValue(longitudeProps));
|
|
70
|
+
setCurrentLatitude(form.getFieldValue(latitudeProps));
|
|
71
|
+
},
|
|
72
|
+
children: "\u5730\u56FE\u5B9A\u4F4D"
|
|
73
|
+
})]
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
})]
|
|
77
|
+
}), /*#__PURE__*/jsx(MapSelector, {
|
|
78
|
+
visible: mapVisible,
|
|
79
|
+
onClose: () => setMapVisible(false),
|
|
80
|
+
longitude: currentLongitude,
|
|
81
|
+
latitude: currentLatitude,
|
|
82
|
+
area: area,
|
|
83
|
+
showArea: showArea,
|
|
84
|
+
onConfirm: handleMapConfirm
|
|
85
|
+
})]
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
Map.displayName = "Map";
|
|
89
|
+
|
|
90
|
+
export { Map as default };
|
package/components/Page/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import HeaderBack from
|
|
1
|
+
import { Space, Button } from 'antd';
|
|
2
|
+
import HeaderBack from '../HeaderBack/index.js';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
|
-
/**
|
|
5
|
-
* 页面布局组件
|
|
6
|
-
*/
|
|
7
5
|
function Page(props) {
|
|
8
6
|
const {
|
|
9
7
|
headerTitle,
|
|
@@ -15,36 +13,47 @@ function Page(props) {
|
|
|
15
13
|
backButtonText = "关闭",
|
|
16
14
|
contentPadding = "20px",
|
|
17
15
|
customActionButtons,
|
|
18
|
-
extraActionButtons
|
|
16
|
+
extraActionButtons
|
|
19
17
|
} = props;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
18
|
+
return /*#__PURE__*/jsxs("div", {
|
|
19
|
+
className: "page",
|
|
20
|
+
children: [isShowAllAction && isShowHeader && /*#__PURE__*/jsx(HeaderBack, {
|
|
21
|
+
title: headerTitle,
|
|
22
|
+
history: history,
|
|
23
|
+
previous: headerPrevious
|
|
24
|
+
}), /*#__PURE__*/jsx("div", {
|
|
25
|
+
style: {
|
|
26
|
+
padding: contentPadding
|
|
27
|
+
},
|
|
28
|
+
children: props.children
|
|
29
|
+
}), isShowAllAction && isShowFooter && /*#__PURE__*/jsxs("div", {
|
|
30
|
+
style: {
|
|
31
|
+
transform: 'scale(1)',
|
|
32
|
+
margin: '0px -44px'
|
|
33
|
+
},
|
|
34
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
35
|
+
style: {
|
|
36
|
+
height: "52px"
|
|
37
|
+
}
|
|
38
|
+
}), /*#__PURE__*/jsx("div", {
|
|
39
|
+
style: {
|
|
40
|
+
textAlign: "center",
|
|
41
|
+
backgroundColor: "rgb(241, 241, 242)",
|
|
42
|
+
padding: "10px 0",
|
|
43
|
+
position: "fixed",
|
|
44
|
+
bottom: "0",
|
|
45
|
+
width: "100%"
|
|
46
|
+
},
|
|
47
|
+
children: customActionButtons || /*#__PURE__*/jsxs(Space, {
|
|
48
|
+
children: [extraActionButtons, /*#__PURE__*/jsx(Button, {
|
|
49
|
+
onClick: () => history?.goBack?.() || window.history.back(),
|
|
50
|
+
children: backButtonText
|
|
51
|
+
})]
|
|
52
|
+
})
|
|
53
|
+
})]
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
46
56
|
}
|
|
47
|
-
|
|
48
57
|
Page.displayName = "Page";
|
|
49
58
|
|
|
50
|
-
export default
|
|
59
|
+
export { Page as default };
|
package/components/Pdf/index.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { useFullscreen } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Document, Page
|
|
5
|
-
import useDownloadFile from
|
|
6
|
-
import { getFileUrl } from
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import { useFullscreen } from 'ahooks';
|
|
2
|
+
import { Modal, Button, Spin, message } from 'antd';
|
|
3
|
+
import { useState, useRef } from 'react';
|
|
4
|
+
import { pdfjs, Document, Page } from 'react-pdf';
|
|
5
|
+
import useDownloadFile from '../../hooks/useDownloadFile/index.js';
|
|
6
|
+
import { getFileUrl } from '../../utils/index.js';
|
|
7
|
+
import 'react-pdf/dist/Page/AnnotationLayer.css';
|
|
8
|
+
import 'react-pdf/dist/Page/TextLayer.css';
|
|
9
|
+
import './index.less';
|
|
10
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
10
11
|
|
|
11
|
-
/**
|
|
12
|
-
* PDF查看组件
|
|
13
|
-
*/
|
|
14
12
|
function Pdf(props) {
|
|
15
13
|
const {
|
|
16
14
|
visible = false,
|
|
@@ -18,117 +16,121 @@ function Pdf(props) {
|
|
|
18
16
|
file,
|
|
19
17
|
name,
|
|
20
18
|
inline = false,
|
|
21
|
-
style = {}
|
|
19
|
+
style = {}
|
|
22
20
|
} = props;
|
|
23
|
-
|
|
24
21
|
const fileUrl = getFileUrl();
|
|
25
22
|
const [numPages, setNumPages] = useState(0);
|
|
26
23
|
const [pdfWidth, setPdfWidth] = useState(600);
|
|
27
24
|
const [loading, setLoading] = useState(true);
|
|
28
|
-
|
|
29
25
|
const fullscreenRef = useRef(null);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
const [isFullscreen, {
|
|
27
|
+
enterFullscreen,
|
|
28
|
+
exitFullscreen
|
|
29
|
+
}] = useFullscreen(fullscreenRef);
|
|
30
|
+
const {
|
|
31
|
+
downloadFile
|
|
32
|
+
} = useDownloadFile();
|
|
34
33
|
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const onDocumentLoadSuccess = ({
|
|
35
|
+
numPages
|
|
36
|
+
}) => {
|
|
37
37
|
setNumPages(numPages);
|
|
38
38
|
setLoading(false);
|
|
39
39
|
};
|
|
40
|
-
|
|
41
40
|
const onDocumentLoadError = () => {
|
|
42
41
|
setLoading(false);
|
|
43
42
|
message.error("加载 PDF 文件失败");
|
|
44
|
-
if (onCancel)
|
|
45
|
-
onCancel();
|
|
43
|
+
if (onCancel) onCancel();
|
|
46
44
|
};
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
const onPageLoadSuccess = ({
|
|
46
|
+
width
|
|
47
|
+
}) => {
|
|
49
48
|
setPdfWidth(width);
|
|
50
49
|
};
|
|
51
50
|
|
|
52
51
|
// 内联模式的PDF内容
|
|
53
|
-
const renderPdfContent = () => (
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
52
|
+
const renderPdfContent = () => /*#__PURE__*/jsxs(Fragment, {
|
|
53
|
+
children: [loading && /*#__PURE__*/jsx("div", {
|
|
54
|
+
style: {
|
|
55
|
+
display: "flex",
|
|
56
|
+
justifyContent: "center",
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
height: "72vh"
|
|
59
|
+
},
|
|
60
|
+
children: /*#__PURE__*/jsx(Spin, {
|
|
61
|
+
size: "large"
|
|
62
|
+
})
|
|
63
|
+
}), /*#__PURE__*/jsx("div", {
|
|
64
|
+
style: {
|
|
65
|
+
height: isFullscreen ? "calc(100vh - 40px - 24px - 8px - 32px - 12px)" : "72vh",
|
|
66
|
+
overflowY: "auto",
|
|
67
|
+
padding: "24px",
|
|
68
|
+
...style
|
|
69
|
+
},
|
|
70
|
+
children: /*#__PURE__*/jsx(Document, {
|
|
71
|
+
file: !file.includes(fileUrl) ? fileUrl + file : file,
|
|
72
|
+
onLoadSuccess: onDocumentLoadSuccess,
|
|
73
|
+
onLoadError: onDocumentLoadError,
|
|
74
|
+
children: Array.from({
|
|
75
|
+
length: numPages
|
|
76
|
+
}).map((_, index) => /*#__PURE__*/jsx(Page, {
|
|
77
|
+
pageNumber: index + 1,
|
|
78
|
+
onLoadSuccess: onPageLoadSuccess
|
|
79
|
+
}, `page_${index + 1}`))
|
|
80
|
+
})
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
75
83
|
|
|
76
84
|
// 如果是内联模式,直接返回PDF内容
|
|
77
85
|
if (inline) {
|
|
78
86
|
return renderPdfContent();
|
|
79
87
|
}
|
|
80
|
-
|
|
81
88
|
const onDownloadFile = () => {
|
|
82
89
|
isFullscreen && exitFullscreen();
|
|
83
90
|
downloadFile({
|
|
84
91
|
url: file,
|
|
85
|
-
name
|
|
92
|
+
name
|
|
86
93
|
});
|
|
87
94
|
};
|
|
88
95
|
|
|
89
96
|
// 默认弹窗模式
|
|
90
|
-
return (
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
return /*#__PURE__*/jsx("div", {
|
|
98
|
+
ref: fullscreenRef,
|
|
99
|
+
children: /*#__PURE__*/jsx(Modal, {
|
|
100
|
+
style: {
|
|
101
|
+
top: isFullscreen ? 0 : 100,
|
|
102
|
+
maxWidth: isFullscreen ? "100vw" : "calc(100vw - 32px)",
|
|
103
|
+
paddingBottom: isFullscreen ? 0 : 24
|
|
104
|
+
},
|
|
105
|
+
open: visible,
|
|
106
|
+
maskClosable: false,
|
|
107
|
+
width: isFullscreen ? "100vw" : pdfWidth + 100,
|
|
108
|
+
title: "PDF\u9884\u89C8",
|
|
109
|
+
onCancel: () => {
|
|
110
|
+
isFullscreen && exitFullscreen();
|
|
111
|
+
onCancel();
|
|
112
|
+
},
|
|
113
|
+
getContainer: false,
|
|
114
|
+
footer: [/*#__PURE__*/jsx(Button, {
|
|
115
|
+
onClick: () => {
|
|
99
116
|
isFullscreen && exitFullscreen();
|
|
100
117
|
onCancel();
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
onClick={() => {
|
|
117
|
-
isFullscreen ? exitFullscreen() : enterFullscreen();
|
|
118
|
-
}}
|
|
119
|
-
>
|
|
120
|
-
{isFullscreen ? "退出全屏" : "全屏"}
|
|
121
|
-
</Button>
|
|
122
|
-
),
|
|
123
|
-
<Button key="download" type="primary" onClick={onDownloadFile}>下载</Button>,
|
|
124
|
-
]}
|
|
125
|
-
>
|
|
126
|
-
{renderPdfContent()}
|
|
127
|
-
</Modal>
|
|
128
|
-
</div>
|
|
129
|
-
);
|
|
118
|
+
},
|
|
119
|
+
children: "\u5173\u95ED"
|
|
120
|
+
}, "cancel"), !loading && /*#__PURE__*/jsx(Button, {
|
|
121
|
+
onClick: () => {
|
|
122
|
+
isFullscreen ? exitFullscreen() : enterFullscreen();
|
|
123
|
+
},
|
|
124
|
+
children: isFullscreen ? "退出全屏" : "全屏"
|
|
125
|
+
}, "fullScreen"), /*#__PURE__*/jsx(Button, {
|
|
126
|
+
type: "primary",
|
|
127
|
+
onClick: onDownloadFile,
|
|
128
|
+
children: "\u4E0B\u8F7D"
|
|
129
|
+
}, "download")],
|
|
130
|
+
children: renderPdfContent()
|
|
131
|
+
})
|
|
132
|
+
});
|
|
130
133
|
}
|
|
131
|
-
|
|
132
134
|
Pdf.displayName = "Pdf";
|
|
133
135
|
|
|
134
|
-
export default
|
|
136
|
+
export { Pdf as default };
|
|
@@ -1,32 +1,26 @@
|
|
|
1
|
-
import { Image } from
|
|
2
|
-
import { getFileUrl } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const fileUrl = getFileUrl();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
PreviewImg.displayName = "PreviewImg";
|
|
31
|
-
|
|
32
|
-
export default PreviewImg;
|
|
1
|
+
import { Image } from 'antd';
|
|
2
|
+
import { getFileUrl } from '../../utils/index.js';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
const PreviewImg = props => {
|
|
6
|
+
const {
|
|
7
|
+
files = [],
|
|
8
|
+
fileUrlKey = "filePath"
|
|
9
|
+
} = props;
|
|
10
|
+
const fileUrl = getFileUrl();
|
|
11
|
+
return /*#__PURE__*/jsx(Image.PreviewGroup, {
|
|
12
|
+
children: files.filter(Boolean).map(item => /*#__PURE__*/jsx(Image, {
|
|
13
|
+
src: item[fileUrlKey] ? fileUrl + item[fileUrlKey] : fileUrl + item,
|
|
14
|
+
wrapperStyle: {
|
|
15
|
+
marginRight: 10,
|
|
16
|
+
marginBottom: 10
|
|
17
|
+
},
|
|
18
|
+
width: 100,
|
|
19
|
+
height: 100,
|
|
20
|
+
alt: ""
|
|
21
|
+
}, item[fileUrlKey] || item))
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
PreviewImg.displayName = "PreviewImg";
|
|
25
|
+
|
|
26
|
+
export { PreviewImg as default };
|