@vtx/components 3.1.97 → 3.1.99
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/lib/_util/filterSpecialCharacters.js +44 -55
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +4 -1
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getToken.js +15 -7
- package/lib/_util/getToken.js.map +1 -1
- package/lib/_util/getUrlParam.js +8 -1
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/isFunction.js +1 -0
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js +1 -0
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/useColSize.js +12 -2
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js +3 -0
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +39 -23
- package/lib/_util/useSet.js.map +1 -1
- package/lib/config.js +2 -1
- package/lib/config.js.map +1 -1
- package/lib/index.js +29 -0
- package/lib/index.js.map +1 -1
- package/lib/style/index.less +2 -2
- package/lib/style/themes/compact.less +1 -1
- package/lib/style/themes/dark.less +9 -9
- package/lib/style/themes/default.less +7 -7
- package/lib/style/themes/index.less +1 -1
- package/lib/style/themes/variable.less +5 -5
- package/lib/vtx-color-picker/index.js +28 -11
- package/lib/vtx-color-picker/index.js.map +1 -1
- package/lib/vtx-color-picker/style/css.js +2 -0
- package/lib/vtx-color-picker/style/css.js.map +1 -1
- package/lib/vtx-color-picker/style/index.js +2 -0
- package/lib/vtx-color-picker/style/index.js.map +1 -1
- package/lib/vtx-combogrid/Combogrid.js +86 -46
- package/lib/vtx-combogrid/Combogrid.js.map +1 -1
- package/lib/vtx-combogrid/index.js +58 -32
- package/lib/vtx-combogrid/index.js.map +1 -1
- package/lib/vtx-combogrid/style/css.js +7 -0
- package/lib/vtx-combogrid/style/css.js.map +1 -1
- package/lib/vtx-combogrid/style/index.js +7 -0
- package/lib/vtx-combogrid/style/index.js.map +1 -1
- package/lib/vtx-datagrid/Alert.js +14 -5
- package/lib/vtx-datagrid/Alert.js.map +1 -1
- package/lib/vtx-datagrid/ColumnSetting.js +76 -37
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/ResizeableTitle.js +15 -3
- package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
- package/lib/vtx-datagrid/index.js +186 -115
- package/lib/vtx-datagrid/index.js.map +1 -1
- package/lib/vtx-datagrid/renderColumnButtons.js +38 -7
- package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
- package/lib/vtx-datagrid/style/css.js +10 -0
- package/lib/vtx-datagrid/style/css.js.map +1 -1
- package/lib/vtx-datagrid/style/index.js +10 -0
- package/lib/vtx-datagrid/style/index.js.map +1 -1
- package/lib/vtx-date-picker/QdatePicker.js +51 -21
- package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
- package/lib/vtx-date-picker/generatePicker.js +65 -24
- package/lib/vtx-date-picker/generatePicker.js.map +1 -1
- package/lib/vtx-date-picker/index.js +7 -1
- package/lib/vtx-date-picker/index.js.map +1 -1
- package/lib/vtx-date-picker/style/css.js +1 -0
- package/lib/vtx-date-picker/style/css.js.map +1 -1
- package/lib/vtx-date-picker/style/index.js +1 -0
- package/lib/vtx-date-picker/style/index.js.map +1 -1
- package/lib/vtx-date-picker/style/index.less +39 -39
- package/lib/vtx-editor/index.js +28 -9
- package/lib/vtx-editor/index.js.map +1 -1
- package/lib/vtx-editor/style/css.js +1 -0
- package/lib/vtx-editor/style/css.js.map +1 -1
- package/lib/vtx-editor/style/index.js +1 -0
- package/lib/vtx-editor/style/index.js.map +1 -1
- package/lib/vtx-editor/style/index.less +8 -8
- package/lib/vtx-ellipsis-text/index.js +27 -14
- package/lib/vtx-ellipsis-text/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/css.js +1 -0
- package/lib/vtx-ellipsis-text/style/css.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/index.js +1 -0
- package/lib/vtx-ellipsis-text/style/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/index.less +13 -13
- package/lib/vtx-export/index.js +69 -36
- package/lib/vtx-export/index.js.map +1 -1
- package/lib/vtx-export/style/css.js +5 -0
- package/lib/vtx-export/style/css.js.map +1 -1
- package/lib/vtx-export/style/index.js +5 -0
- package/lib/vtx-export/style/index.js.map +1 -1
- package/lib/vtx-export-async/History.js +100 -59
- package/lib/vtx-export-async/History.js.map +1 -1
- package/lib/vtx-export-async/index.js +105 -64
- package/lib/vtx-export-async/index.js.map +1 -1
- package/lib/vtx-export-async/style/css.js.map +1 -1
- package/lib/vtx-export-async/style/index.js.map +1 -1
- package/lib/vtx-export-async/util.js +13 -2
- package/lib/vtx-export-async/util.js.map +1 -1
- package/lib/vtx-form-layout/Card.js +33 -11
- package/lib/vtx-form-layout/Card.js.map +1 -1
- package/lib/vtx-form-layout/Divider.js +11 -5
- package/lib/vtx-form-layout/Divider.js.map +1 -1
- package/lib/vtx-form-layout/FormItem.js +34 -12
- package/lib/vtx-form-layout/FormItem.js.map +1 -1
- package/lib/vtx-form-layout/Pane.js +9 -3
- package/lib/vtx-form-layout/Pane.js.map +1 -1
- package/lib/vtx-form-layout/Row.js +8 -1
- package/lib/vtx-form-layout/Row.js.map +1 -1
- package/lib/vtx-form-layout/context.js +4 -1
- package/lib/vtx-form-layout/context.js.map +1 -1
- package/lib/vtx-form-layout/demo/Modal.less +43 -43
- package/lib/vtx-form-layout/index.js +24 -9
- package/lib/vtx-form-layout/index.js.map +1 -1
- package/lib/vtx-form-layout/style/css.js +7 -0
- package/lib/vtx-form-layout/style/css.js.map +1 -1
- package/lib/vtx-form-layout/style/index.js +7 -0
- package/lib/vtx-form-layout/style/index.js.map +1 -1
- package/lib/vtx-form-layout/style/index.less +216 -216
- package/lib/vtx-image/Image.js +113 -73
- package/lib/vtx-image/Image.js.map +1 -1
- package/lib/vtx-image/Preview.js +59 -30
- package/lib/vtx-image/Preview.js.map +1 -1
- package/lib/vtx-image/PreviewGroup.js +47 -17
- package/lib/vtx-image/PreviewGroup.js.map +1 -1
- package/lib/vtx-image/index.js +11 -4
- package/lib/vtx-image/index.js.map +1 -1
- package/lib/vtx-image/style/css.js +1 -0
- package/lib/vtx-image/style/css.js.map +1 -1
- package/lib/vtx-image/style/index.js +1 -0
- package/lib/vtx-image/style/index.js.map +1 -1
- package/lib/vtx-import/index.js +78 -45
- package/lib/vtx-import/index.js.map +1 -1
- package/lib/vtx-import/result.js +28 -10
- package/lib/vtx-import/result.js.map +1 -1
- package/lib/vtx-import/style/css.js +3 -0
- package/lib/vtx-import/style/css.js.map +1 -1
- package/lib/vtx-import/style/index.js +3 -0
- package/lib/vtx-import/style/index.js.map +1 -1
- package/lib/vtx-import/style/index.less +8 -8
- package/lib/vtx-import2/CheckResult.js +8 -1
- package/lib/vtx-import2/CheckResult.js.map +1 -1
- package/lib/vtx-import2/Content.js +33 -11
- package/lib/vtx-import2/Content.js.map +1 -1
- package/lib/vtx-import2/DownloadSvg.js +6 -1
- package/lib/vtx-import2/DownloadSvg.js.map +1 -1
- package/lib/vtx-import2/ImportResult.js +14 -7
- package/lib/vtx-import2/ImportResult.js.map +1 -1
- package/lib/vtx-import2/UploadSvg.js +6 -1
- package/lib/vtx-import2/UploadSvg.js.map +1 -1
- package/lib/vtx-import2/index.js +107 -51
- package/lib/vtx-import2/index.js.map +1 -1
- package/lib/vtx-import2/style/css.js +3 -0
- package/lib/vtx-import2/style/css.js.map +1 -1
- package/lib/vtx-import2/style/index.js +3 -0
- package/lib/vtx-import2/style/index.js.map +1 -1
- package/lib/vtx-import2/style/index.less +102 -102
- package/lib/vtx-input/TextArea.js +27 -10
- package/lib/vtx-input/TextArea.js.map +1 -1
- package/lib/vtx-input/index.js +45 -20
- package/lib/vtx-input/index.js.map +1 -1
- package/lib/vtx-input/style/css.js +1 -0
- package/lib/vtx-input/style/css.js.map +1 -1
- package/lib/vtx-input/style/index.js +1 -0
- package/lib/vtx-input/style/index.js.map +1 -1
- package/lib/vtx-input/style/index.less +24 -24
- package/lib/vtx-input/useLength.js +20 -7
- package/lib/vtx-input/useLength.js.map +1 -1
- package/lib/vtx-modal/Title.js +8 -2
- package/lib/vtx-modal/Title.js.map +1 -1
- package/lib/vtx-modal/index.js +82 -49
- package/lib/vtx-modal/index.js.map +1 -1
- package/lib/vtx-modal/style/css.js +1 -0
- package/lib/vtx-modal/style/css.js.map +1 -1
- package/lib/vtx-modal/style/index.js +1 -0
- package/lib/vtx-modal/style/index.js.map +1 -1
- package/lib/vtx-page-layout/Basic.js +8 -3
- package/lib/vtx-page-layout/Basic.js.map +1 -1
- package/lib/vtx-page-layout/Content.js +26 -15
- package/lib/vtx-page-layout/Content.js.map +1 -1
- package/lib/vtx-page-layout/Pane.js +12 -3
- package/lib/vtx-page-layout/Pane.js.map +1 -1
- package/lib/vtx-page-layout/TableLayout.js +60 -30
- package/lib/vtx-page-layout/TableLayout.js.map +1 -1
- package/lib/vtx-page-layout/TableWrap.js +22 -11
- package/lib/vtx-page-layout/TableWrap.js.map +1 -1
- package/lib/vtx-page-layout/container.js +51 -23
- package/lib/vtx-page-layout/container.js.map +1 -1
- package/lib/vtx-page-layout/index.js +10 -1
- package/lib/vtx-page-layout/index.js.map +1 -1
- package/lib/vtx-page-layout/style/css.js.map +1 -1
- package/lib/vtx-page-layout/style/index.js.map +1 -1
- package/lib/vtx-page-layout/style/index.less +138 -138
- package/lib/vtx-rps-frame/index.js +57 -37
- package/lib/vtx-rps-frame/index.js.map +1 -1
- package/lib/vtx-rps-frame/style/css.js.map +1 -1
- package/lib/vtx-rps-frame/style/index.js.map +1 -1
- package/lib/vtx-scrollable-row/index.js +64 -30
- package/lib/vtx-scrollable-row/index.js.map +1 -1
- package/lib/vtx-scrollable-row/style/css.js.map +1 -1
- package/lib/vtx-scrollable-row/style/index.js.map +1 -1
- package/lib/vtx-scrollable-row/style/index.less +113 -113
- package/lib/vtx-search/VtxCol.js +26 -7
- package/lib/vtx-search/VtxCol.js.map +1 -1
- package/lib/vtx-search/VtxRow.js +14 -7
- package/lib/vtx-search/VtxRow.js.map +1 -1
- package/lib/vtx-search/index.js +106 -61
- package/lib/vtx-search/index.js.map +1 -1
- package/lib/vtx-search/style/css.js +4 -0
- package/lib/vtx-search/style/css.js.map +1 -1
- package/lib/vtx-search/style/index.js +4 -0
- package/lib/vtx-search/style/index.js.map +1 -1
- package/lib/vtx-search-map-input/index.js +93 -58
- package/lib/vtx-search-map-input/index.js.map +1 -1
- package/lib/vtx-search-map-input/style/css.js +2 -0
- package/lib/vtx-search-map-input/style/css.js.map +1 -1
- package/lib/vtx-search-map-input/style/index.js +2 -0
- package/lib/vtx-search-map-input/style/index.js.map +1 -1
- package/lib/vtx-select/index.js +91 -39
- package/lib/vtx-select/index.js.map +1 -1
- package/lib/vtx-select/style/css.js +8 -0
- package/lib/vtx-select/style/css.js.map +1 -1
- package/lib/vtx-select/style/index.js +8 -0
- package/lib/vtx-select/style/index.js.map +1 -1
- package/lib/vtx-select/style/index.less +68 -68
- package/lib/vtx-signature/index.js +33 -18
- package/lib/vtx-signature/index.js.map +1 -1
- package/lib/vtx-signature/style/css.js +2 -0
- package/lib/vtx-signature/style/css.js.map +1 -1
- package/lib/vtx-signature/style/index.js +2 -0
- package/lib/vtx-signature/style/index.js.map +1 -1
- package/lib/vtx-signature/style/index.less +33 -33
- package/lib/vtx-split-pane/Pane.js +22 -11
- package/lib/vtx-split-pane/Pane.js.map +1 -1
- package/lib/vtx-split-pane/Resizer.js +39 -19
- package/lib/vtx-split-pane/Resizer.js.map +1 -1
- package/lib/vtx-split-pane/SplitPane.js +107 -51
- package/lib/vtx-split-pane/SplitPane.js.map +1 -1
- package/lib/vtx-split-pane/index.js +6 -1
- package/lib/vtx-split-pane/index.js.map +1 -1
- package/lib/vtx-split-pane/style/css.js +3 -0
- package/lib/vtx-split-pane/style/css.js.map +1 -1
- package/lib/vtx-split-pane/style/index.js +3 -0
- package/lib/vtx-split-pane/style/index.js.map +1 -1
- package/lib/vtx-split-pane/style/index.less +76 -76
- package/lib/vtx-statistics-column/Back.js +9 -2
- package/lib/vtx-statistics-column/Back.js.map +1 -1
- package/lib/vtx-statistics-column/Item.js +30 -14
- package/lib/vtx-statistics-column/Item.js.map +1 -1
- package/lib/vtx-statistics-column/Total.js +30 -14
- package/lib/vtx-statistics-column/Total.js.map +1 -1
- package/lib/vtx-statistics-column/context.js +4 -1
- package/lib/vtx-statistics-column/context.js.map +1 -1
- package/lib/vtx-statistics-column/index.js +18 -1
- package/lib/vtx-statistics-column/index.js.map +1 -1
- package/lib/vtx-statistics-column/style/css.js +1 -0
- package/lib/vtx-statistics-column/style/css.js.map +1 -1
- package/lib/vtx-statistics-column/style/index.js +1 -0
- package/lib/vtx-statistics-column/style/index.js.map +1 -1
- package/lib/vtx-statistics-column/style/index.less +59 -59
- package/lib/vtx-time-picker/index.js +18 -4
- package/lib/vtx-time-picker/index.js.map +1 -1
- package/lib/vtx-time-picker/style/css.js.map +1 -1
- package/lib/vtx-time-picker/style/index.js.map +1 -1
- package/lib/vtx-tree/index.js +114 -49
- package/lib/vtx-tree/index.js.map +1 -1
- package/lib/vtx-tree/style/css.js +2 -0
- package/lib/vtx-tree/style/css.js.map +1 -1
- package/lib/vtx-tree/style/index.js +2 -0
- package/lib/vtx-tree/style/index.js.map +1 -1
- package/lib/vtx-tree/utils.js +27 -6
- package/lib/vtx-tree/utils.js.map +1 -1
- package/lib/vtx-tree-select/index.js +71 -27
- package/lib/vtx-tree-select/index.js.map +1 -1
- package/lib/vtx-tree-select/style/css.js +3 -0
- package/lib/vtx-tree-select/style/css.js.map +1 -1
- package/lib/vtx-tree-select/style/index.js +3 -0
- package/lib/vtx-tree-select/style/index.js.map +1 -1
- package/lib/vtx-upload/FilePreview.js +33 -15
- package/lib/vtx-upload/FilePreview.js.map +1 -1
- package/lib/vtx-upload/index.js +156 -79
- package/lib/vtx-upload/index.js.map +1 -1
- package/lib/vtx-upload/style/css.js +6 -0
- package/lib/vtx-upload/style/css.js.map +1 -1
- package/lib/vtx-upload/style/index.js +6 -0
- package/lib/vtx-upload/style/index.js.map +1 -1
- package/lib/vtx-upload/style/index.less +61 -61
- package/lib/vtx-wang-editor/index.js +116 -74
- package/lib/vtx-wang-editor/index.js.map +1 -1
- package/lib/vtx-wang-editor/style/css.js +1 -0
- package/lib/vtx-wang-editor/style/css.js.map +1 -1
- package/lib/vtx-wang-editor/style/index.js +1 -0
- package/lib/vtx-wang-editor/style/index.js.map +1 -1
- package/lib/vtx-wang-editor/style/index.less +12 -12
- package/lib/vtx-wang-editor/wangEditorUtil.js +136 -75
- package/lib/vtx-wang-editor/wangEditorUtil.js.map +1 -1
- package/lib/vtx-ztree/index.js +119 -69
- package/lib/vtx-ztree/index.js.map +1 -1
- package/lib/vtx-ztree/style/css.js +1 -0
- package/lib/vtx-ztree/style/css.js.map +1 -1
- package/lib/vtx-ztree/style/index.js +1 -0
- package/lib/vtx-ztree/style/index.js.map +1 -1
- package/lib/vtx-ztree/style/index.less +45 -45
- package/lib/vtx-ztree-select/index.js +143 -74
- package/lib/vtx-ztree-select/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/css.js +3 -0
- package/lib/vtx-ztree-select/style/css.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.js +3 -0
- package/lib/vtx-ztree-select/style/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.less +109 -109
- package/package.json +121 -121
package/lib/vtx-upload/index.js
CHANGED
|
@@ -1,52 +1,86 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports["default"] = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _useSetState3 = _interopRequireDefault(require("ahooks/es/useSetState"));
|
|
13
|
+
|
|
10
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
11
16
|
var _viewerjs = _interopRequireDefault(require("viewerjs"));
|
|
17
|
+
|
|
12
18
|
var _upload = _interopRequireDefault(require("antd/lib/upload"));
|
|
19
|
+
|
|
13
20
|
var _button = _interopRequireDefault(require("antd/lib/button"));
|
|
21
|
+
|
|
14
22
|
var _InboxOutlined = _interopRequireDefault(require("@ant-design/icons/InboxOutlined"));
|
|
23
|
+
|
|
15
24
|
var _PlusOutlined = _interopRequireDefault(require("@ant-design/icons/PlusOutlined"));
|
|
25
|
+
|
|
16
26
|
var _UploadOutlined = _interopRequireDefault(require("@ant-design/icons/UploadOutlined"));
|
|
27
|
+
|
|
17
28
|
var _message = _interopRequireDefault(require("antd/lib/message"));
|
|
29
|
+
|
|
18
30
|
var _downloadFile = _interopRequireDefault(require("@vtx/utils/lib/downloadFile"));
|
|
31
|
+
|
|
19
32
|
var _lodash = _interopRequireDefault(require("lodash.debounce"));
|
|
33
|
+
|
|
20
34
|
var _FilePreview = _interopRequireDefault(require("./FilePreview"));
|
|
35
|
+
|
|
21
36
|
var _getToken = _interopRequireDefault(require("../_util/getToken"));
|
|
37
|
+
|
|
22
38
|
var _antdImgCrop = _interopRequireDefault(require("antd-img-crop"));
|
|
39
|
+
|
|
23
40
|
var _excluded = ["isDragger", "draggerConfig", "accept", "mode", "viewMode", "showUploadList", "customizedButton", "listType", "onSuccess", "onError", "onRemove", "maxFileSize", "beforeUpload", "maxNum", "flag", "crop"];
|
|
41
|
+
|
|
24
42
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
-
|
|
26
|
-
function
|
|
43
|
+
|
|
44
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
45
|
+
|
|
46
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
47
|
+
|
|
27
48
|
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); }
|
|
49
|
+
|
|
28
50
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
51
|
+
|
|
29
52
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
53
|
+
|
|
30
54
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
55
|
+
|
|
31
56
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
32
|
-
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
function
|
|
36
|
-
|
|
57
|
+
|
|
58
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
59
|
+
|
|
60
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
61
|
+
|
|
62
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
63
|
+
|
|
37
64
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
65
|
+
|
|
38
66
|
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."); }
|
|
67
|
+
|
|
39
68
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
40
|
-
|
|
41
|
-
function
|
|
69
|
+
|
|
70
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
71
|
+
|
|
72
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
73
|
+
|
|
42
74
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
75
|
+
|
|
43
76
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
77
|
+
|
|
44
78
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
79
|
+
|
|
45
80
|
var debouncedMessage = (0, _lodash["default"])(function (msg) {
|
|
46
81
|
_message["default"].error(msg);
|
|
47
|
-
}, 500);
|
|
82
|
+
}, 500); //文件预览
|
|
48
83
|
|
|
49
|
-
//文件预览
|
|
50
84
|
var initVPrev = {
|
|
51
85
|
type: '',
|
|
52
86
|
//video or file
|
|
@@ -58,87 +92,100 @@ var initVPrev = {
|
|
|
58
92
|
var initUrl = {
|
|
59
93
|
action: '/cloudFile/common/uploadFile',
|
|
60
94
|
downloadUrl: '/cloudFile/common/downloadFile?id=',
|
|
61
|
-
thumbnailUrl: '/vortex/rest/cloud/np/file/downloadFileThumbnail?outputQuality=0.5&scale=0.2&id='
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
|
|
95
|
+
thumbnailUrl: '/vortex/rest/cloud/np/file/downloadFileThumbnail?outputQuality=0.5&scale=0.2&id=' //previewUrl: '/onlinePreview',
|
|
96
|
+
|
|
97
|
+
}; //禁止上传的文件类型
|
|
98
|
+
|
|
65
99
|
var rejectTypes = ['.asp', '.aspx', '.jsp', '.exe', '.cgi', '.asa', '.cer', '.cdx', '.hta'];
|
|
66
100
|
var Dragger = _upload["default"].Dragger;
|
|
67
101
|
var VtxUpload = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
68
102
|
var _window;
|
|
103
|
+
|
|
69
104
|
var _props$isDragger = props.isDragger,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
105
|
+
isDragger = _props$isDragger === void 0 ? false : _props$isDragger,
|
|
106
|
+
_props$draggerConfig = props.draggerConfig,
|
|
107
|
+
draggerConfig = _props$draggerConfig === void 0 ? {} : _props$draggerConfig,
|
|
108
|
+
accept = props.accept,
|
|
109
|
+
_props$mode = props.mode,
|
|
110
|
+
mode = _props$mode === void 0 ? 'multiple' : _props$mode,
|
|
111
|
+
viewMode = props.viewMode,
|
|
112
|
+
showUploadList = props.showUploadList,
|
|
113
|
+
customizedButton = props.customizedButton,
|
|
114
|
+
_props$listType = props.listType,
|
|
115
|
+
listType = _props$listType === void 0 ? 'text' : _props$listType,
|
|
116
|
+
onSuccess = props.onSuccess,
|
|
117
|
+
onError = props.onError,
|
|
118
|
+
_onRemove = props.onRemove,
|
|
119
|
+
_props$maxFileSize = props.maxFileSize,
|
|
120
|
+
maxFileSize = _props$maxFileSize === void 0 ? 5 * 1024 * 1024 : _props$maxFileSize,
|
|
121
|
+
_beforeUpload = props.beforeUpload,
|
|
122
|
+
maxNum = props.maxNum,
|
|
123
|
+
flag = props.flag,
|
|
124
|
+
crop = props.crop,
|
|
125
|
+
rest = _objectWithoutProperties(props, _excluded); // 是否使用缩略图
|
|
126
|
+
|
|
127
|
+
|
|
92
128
|
var useThumbnail = (props.useThumbnail === undefined ? true : props.useThumbnail) && (listType == 'picture' || listType == 'picture-card');
|
|
129
|
+
|
|
93
130
|
var _useState = (0, _react.useState)([]),
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
131
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
132
|
+
fileList = _useState2[0],
|
|
133
|
+
setFileList = _useState2[1]; //初始化文件列表
|
|
134
|
+
|
|
135
|
+
|
|
97
136
|
var _useState3 = (0, _react.useState)(null),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
137
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
138
|
+
imageViewer = _useState4[0],
|
|
139
|
+
setImageViewer = _useState4[1]; //图片预览
|
|
140
|
+
|
|
141
|
+
|
|
101
142
|
var _useState5 = (0, _react.useState)([]),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
143
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
144
|
+
imageList = _useState6[0],
|
|
145
|
+
setImageList = _useState6[1];
|
|
146
|
+
|
|
105
147
|
var _useState7 = (0, _react.useState)(null),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
var _useSetState = (0, _useSetState3["default"])(initVPrev),
|
|
110
|
-
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
111
|
-
vPrev = _useSetState2[0],
|
|
112
|
-
setVPrev = _useSetState2[1]; //文件预览相关
|
|
148
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
149
|
+
imageCt = _useState8[0],
|
|
150
|
+
setImageCt = _useState8[1];
|
|
113
151
|
|
|
152
|
+
var _useSetState = (0, _useSetState3["default"])(initVPrev),
|
|
153
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
154
|
+
vPrev = _useSetState2[0],
|
|
155
|
+
setVPrev = _useSetState2[1]; //文件预览相关
|
|
114
156
|
// 参数中拼接token
|
|
157
|
+
|
|
158
|
+
|
|
115
159
|
function joinToken(str) {
|
|
116
160
|
if (str.indexOf('token=') === -1 && str.indexOf('?') > -1) {
|
|
117
161
|
return str.replace('?', "?token=".concat((0, _getToken["default"])() || '', "&"));
|
|
118
162
|
} else if (str.indexOf('?') === -1) {
|
|
119
163
|
return str + "?token=".concat((0, _getToken["default"])() || '');
|
|
120
164
|
}
|
|
165
|
+
|
|
121
166
|
return str;
|
|
122
167
|
}
|
|
168
|
+
|
|
123
169
|
var url = {
|
|
124
170
|
action: props.action || initUrl.action,
|
|
125
171
|
downloadUrl: joinToken(props.downloadUrl || initUrl.downloadUrl),
|
|
126
|
-
thumbnailUrl: joinToken((_window = window) !== null && _window !== void 0 && _window.flsPrefix ? "".concat(window.flsPrefix).concat(initUrl.thumbnailUrl) : "".concat(props.thumbnailUrl || initUrl.thumbnailUrl))
|
|
127
|
-
|
|
172
|
+
thumbnailUrl: joinToken((_window = window) !== null && _window !== void 0 && _window.flsPrefix ? "".concat(window.flsPrefix).concat(initUrl.thumbnailUrl) : "".concat(props.thumbnailUrl || initUrl.thumbnailUrl)) //previewUrl: props.previewUrl || initUrl.previewUrl,
|
|
173
|
+
|
|
128
174
|
};
|
|
129
175
|
var action = url.action,
|
|
130
|
-
|
|
131
|
-
|
|
176
|
+
downloadUrl = url.downloadUrl,
|
|
177
|
+
thumbnailUrl = url.thumbnailUrl;
|
|
132
178
|
(0, _react.useEffect)(function () {
|
|
133
179
|
setFileList(getSynFileList(props) || []);
|
|
134
180
|
}, [flag]);
|
|
135
181
|
(0, _react.useEffect)(function () {
|
|
136
182
|
if (Array.isArray(fileList)) {
|
|
137
183
|
// 只有图片的才可以预览,这边需要判断是否是图片
|
|
138
|
-
var imagelist = [];
|
|
139
|
-
|
|
184
|
+
var imagelist = []; // 只能通过后缀来判断
|
|
185
|
+
|
|
140
186
|
fileList.map(function (file) {
|
|
141
187
|
var _file$type;
|
|
188
|
+
|
|
142
189
|
if (((_file$type = file.type) === null || _file$type === void 0 ? void 0 : _file$type.indexOf('image')) > -1) {
|
|
143
190
|
imagelist.push(file);
|
|
144
191
|
}
|
|
@@ -151,8 +198,10 @@ var VtxUpload = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
151
198
|
setImageViewer(new _viewerjs["default"](imageCt, {}));
|
|
152
199
|
}
|
|
153
200
|
}, [imageCt]);
|
|
201
|
+
|
|
154
202
|
var getConfig = function getConfig() {
|
|
155
203
|
var token = (0, _getToken["default"])() || '';
|
|
204
|
+
|
|
156
205
|
var config = _objectSpread(_objectSpread({}, rest), {}, {
|
|
157
206
|
accept: accept,
|
|
158
207
|
action: action,
|
|
@@ -164,14 +213,18 @@ var VtxUpload = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
164
213
|
}, rest.headers),
|
|
165
214
|
onChange: function onChange(info) {
|
|
166
215
|
setFileList(info.fileList);
|
|
216
|
+
|
|
167
217
|
if (info.file.response && info.file.response.result === 1) {
|
|
168
218
|
_message["default"].error(info.file.response.errMsg || '上传失败!');
|
|
219
|
+
|
|
169
220
|
var flt = _toConsumableArray(fileList);
|
|
221
|
+
|
|
170
222
|
flt.pop();
|
|
171
223
|
setFileList(flt);
|
|
172
224
|
return;
|
|
173
|
-
}
|
|
174
|
-
|
|
225
|
+
} // 此处根据后台返回的数据结构取得文件ID
|
|
226
|
+
|
|
227
|
+
|
|
175
228
|
if (info.file.status !== 'uploading' && info.file.status !== 'removed') {
|
|
176
229
|
var vtxId = info.file.response && Array.isArray(info.file.response.data) && info.file.response.data.length > 0 ? info.file.response.data[0].id : undefined;
|
|
177
230
|
var newFileList = info.fileList;
|
|
@@ -192,21 +245,23 @@ var VtxUpload = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
192
245
|
thumbUrl: useThumbnail ? thumbnailUrl + vtxId : undefined
|
|
193
246
|
});
|
|
194
247
|
}
|
|
248
|
+
|
|
195
249
|
return item;
|
|
196
250
|
});
|
|
251
|
+
|
|
197
252
|
if (mode == 'single') {
|
|
198
253
|
setFileList([newFile]);
|
|
199
254
|
} else {
|
|
200
255
|
setFileList(newFileList);
|
|
201
|
-
}
|
|
202
|
-
// 更新组件状态
|
|
256
|
+
} // 更新组件状态
|
|
203
257
|
// if (mode == 'single' && info.file.status === 'done') {
|
|
204
258
|
// setFileList([newFile]);
|
|
205
259
|
// } else {
|
|
206
260
|
// setFileList(newFileList);
|
|
207
261
|
// }
|
|
208
|
-
|
|
209
262
|
// 触发外部方法
|
|
263
|
+
|
|
264
|
+
|
|
210
265
|
if (info.file.status === 'done') {
|
|
211
266
|
if (typeof onSuccess == 'function') {
|
|
212
267
|
onSuccess(newFile);
|
|
@@ -227,29 +282,38 @@ var VtxUpload = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
227
282
|
//限制文件大小
|
|
228
283
|
if (maxFileSize && typeof maxFileSize === 'number') {
|
|
229
284
|
var limit = file.size < maxFileSize;
|
|
285
|
+
|
|
230
286
|
if (!limit) {
|
|
231
287
|
_message["default"].error("\u8BF7\u4E0A\u4F20".concat(maxFileSize / 1024 / 1024, "M\u4EE5\u5185\u7684\u6587\u4EF6"));
|
|
288
|
+
|
|
232
289
|
return false;
|
|
233
290
|
}
|
|
234
|
-
}
|
|
235
|
-
|
|
291
|
+
} //限制不允许上传的文件类型(通过文件名后缀)
|
|
292
|
+
|
|
293
|
+
|
|
236
294
|
var pointIndex = file.name ? file.name.lastIndexOf('.') : -1;
|
|
295
|
+
|
|
237
296
|
if (pointIndex > -1) {
|
|
238
297
|
var fileType = file.name.substring(pointIndex);
|
|
298
|
+
|
|
239
299
|
if (rejectTypes.includes(fileType)) {
|
|
240
300
|
_message["default"].error('不支持该文件类型');
|
|
301
|
+
|
|
241
302
|
return false;
|
|
242
303
|
}
|
|
243
|
-
}
|
|
244
|
-
|
|
304
|
+
} // 多选限制文件数量
|
|
305
|
+
|
|
306
|
+
|
|
245
307
|
if (typeof maxNum === 'number' && afterFileList.length + fileList.length > maxNum) {
|
|
246
308
|
// 减少提示错误次数, 思路,防抖 这边有个问题 就是防抖的这个方法 return fasle 不上传
|
|
247
309
|
debouncedMessage("\u6700\u591A\u4E0A\u4F20".concat(maxNum, "\u4E2A"));
|
|
248
310
|
return false;
|
|
249
311
|
}
|
|
312
|
+
|
|
250
313
|
if (typeof _beforeUpload === 'function') {
|
|
251
314
|
return _beforeUpload(file, afterFileList);
|
|
252
315
|
}
|
|
316
|
+
|
|
253
317
|
return true;
|
|
254
318
|
},
|
|
255
319
|
onDownload: function onDownload(file) {
|
|
@@ -258,11 +322,13 @@ var VtxUpload = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
258
322
|
}, 'blob');
|
|
259
323
|
}
|
|
260
324
|
});
|
|
325
|
+
|
|
261
326
|
if (props.onPreview && typeof props.onPreview === 'function') {
|
|
262
327
|
config.onPreview = props.onPreview;
|
|
263
328
|
} else {
|
|
264
329
|
config.onPreview = function (file) {
|
|
265
330
|
var _file$type2, _file$type3;
|
|
331
|
+
|
|
266
332
|
if (!file.type) {
|
|
267
333
|
(0, _downloadFile["default"])(downloadUrl + file.id, {
|
|
268
334
|
fileName: file.name
|
|
@@ -282,9 +348,7 @@ var VtxUpload = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
282
348
|
(0, _downloadFile["default"])(downloadUrl + file.id, {
|
|
283
349
|
fileName: file.name
|
|
284
350
|
}, 'blob');
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
// TODO 暂无好的文件预览服务,等后续完善,只提供下载
|
|
351
|
+
} // TODO 暂无好的文件预览服务,等后续完善,只提供下载
|
|
288
352
|
// else if (
|
|
289
353
|
// file.type == 'application/PDF' ||
|
|
290
354
|
// file.type == 'application/vnd.ms-excel' ||
|
|
@@ -302,7 +366,6 @@ var VtxUpload = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
302
366
|
// '?id=' + file.id + '&fullfilename=' + file.name.replace(/\s*/g, ''),
|
|
303
367
|
// )}`;
|
|
304
368
|
// }
|
|
305
|
-
|
|
306
369
|
// setVPrev({
|
|
307
370
|
// type: 'file',
|
|
308
371
|
// name: file.name || '文件预览',
|
|
@@ -311,18 +374,21 @@ var VtxUpload = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
311
374
|
// visible: true,
|
|
312
375
|
// });
|
|
313
376
|
// }
|
|
377
|
+
|
|
314
378
|
};
|
|
315
|
-
}
|
|
379
|
+
} // viewMode
|
|
380
|
+
|
|
316
381
|
|
|
317
|
-
// viewMode
|
|
318
382
|
if (viewMode) {
|
|
319
383
|
config.showUploadList = {
|
|
320
384
|
showRemoveIcon: false,
|
|
321
385
|
showDownloadIcon: true
|
|
322
386
|
};
|
|
323
387
|
}
|
|
388
|
+
|
|
324
389
|
return config;
|
|
325
390
|
};
|
|
391
|
+
|
|
326
392
|
var handlePreview = function handlePreview(file) {
|
|
327
393
|
var imageIndex = imageList.map(function (item) {
|
|
328
394
|
return item.id;
|
|
@@ -331,23 +397,28 @@ var VtxUpload = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
331
397
|
imageViewer.update();
|
|
332
398
|
imageViewer.view(imageIndex);
|
|
333
399
|
};
|
|
400
|
+
|
|
334
401
|
var getSynFileList = function getSynFileList(props) {
|
|
335
|
-
var processedFileList = props.fileList || [];
|
|
336
|
-
|
|
402
|
+
var processedFileList = props.fileList || []; // 单文件模式只取第一个
|
|
403
|
+
|
|
337
404
|
if (props.mode == 'single' && processedFileList.length > 1) {
|
|
338
405
|
processedFileList = [processedFileList[0]];
|
|
339
406
|
}
|
|
407
|
+
|
|
340
408
|
processedFileList = processedFileList.map(function (item, index) {
|
|
341
409
|
// 将外部传入的简易文件数组处理成为组件需要的数组结构
|
|
342
410
|
if (item.name === undefined || item.id === undefined) {
|
|
343
411
|
// eslint-disable-next-line no-console
|
|
344
412
|
console.error('文件列表的name和id属性不能为空');
|
|
345
413
|
}
|
|
414
|
+
|
|
346
415
|
var url = item.url || downloadUrl + item.id,
|
|
347
|
-
|
|
416
|
+
thumbUrl = useThumbnail ? item.thumbUrl || thumbnailUrl + item.id : undefined;
|
|
417
|
+
|
|
348
418
|
if (!isSupportThumbnail(item.type)) {
|
|
349
419
|
thumbUrl = url;
|
|
350
420
|
}
|
|
421
|
+
|
|
351
422
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
352
423
|
uid: -1 - index,
|
|
353
424
|
status: 'done',
|
|
@@ -357,6 +428,7 @@ var VtxUpload = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
357
428
|
});
|
|
358
429
|
return processedFileList;
|
|
359
430
|
};
|
|
431
|
+
|
|
360
432
|
var upload = /*#__PURE__*/_react["default"].createElement(_upload["default"], _extends({}, getConfig(), {
|
|
361
433
|
ref: ref
|
|
362
434
|
}), viewMode || fileList.length >= maxNum ? null : customizedButton || (listType == 'picture-card' ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_PlusOutlined["default"], {
|
|
@@ -367,6 +439,7 @@ var VtxUpload = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
367
439
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
368
440
|
className: "ant-upload-text"
|
|
369
441
|
}, "\u4E0A\u4F20")) : /*#__PURE__*/_react["default"].createElement(_button["default"], null, /*#__PURE__*/_react["default"].createElement(_UploadOutlined["default"], null), "\u4E0A\u4F20")));
|
|
442
|
+
|
|
370
443
|
var comp = listType == 'picture-card' && !!crop ? /*#__PURE__*/_react["default"].createElement(_antdImgCrop["default"], {
|
|
371
444
|
rotationSlider: true
|
|
372
445
|
}, upload) : upload;
|
|
@@ -397,6 +470,7 @@ var VtxUpload = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
397
470
|
}
|
|
398
471
|
}, imageList.filter(function (item) {
|
|
399
472
|
var _item$type;
|
|
473
|
+
|
|
400
474
|
return item.type && ((_item$type = item.type) === null || _item$type === void 0 ? void 0 : _item$type.indexOf('image')) > -1;
|
|
401
475
|
}).map(function (item, index) {
|
|
402
476
|
return /*#__PURE__*/_react["default"].createElement("li", {
|
|
@@ -436,11 +510,14 @@ VtxUpload.propTypes = {
|
|
|
436
510
|
useThumbnail: _propTypes["default"].bool,
|
|
437
511
|
crop: _propTypes["default"].bool
|
|
438
512
|
};
|
|
439
|
-
var _default =
|
|
513
|
+
var _default = VtxUpload;
|
|
514
|
+
exports["default"] = _default;
|
|
515
|
+
|
|
440
516
|
function isSupportThumbnail(type) {
|
|
441
517
|
if (['image/webp'].includes(type)) {
|
|
442
518
|
return false;
|
|
443
519
|
}
|
|
520
|
+
|
|
444
521
|
return true;
|
|
445
522
|
}
|
|
446
523
|
//# sourceMappingURL=index.js.map
|