fan-standard-comp 3.1.2 → 3.1.4
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/package.json +1 -1
- package/dist/f26952c118ab6cdcd23dc0028ee98c11.svg +0 -173
- package/dist/fan-standard-comp.umd.js +0 -597
- package/dist/fonts/iconfont.eot +0 -0
- package/dist/fonts/iconfont.ttf +0 -0
- package/dist/fonts/iconfont.woff +0 -0
- package/es/ButtonGroup/ButtonList.d.ts +0 -2
- package/es/ButtonGroup/ButtonList.js +0 -37
- package/es/ButtonGroup/ButtonMenu.d.ts +0 -2
- package/es/ButtonGroup/ButtonMenu.js +0 -38
- package/es/ButtonGroup/PopConfirmTitle.d.ts +0 -9
- package/es/ButtonGroup/PopConfirmTitle.js +0 -37
- package/es/ButtonGroup/index.d.ts +0 -30
- package/es/ButtonGroup/index.js +0 -374
- package/es/ButtonGroup/style/index.less +0 -36
- package/es/DragContent/DragBar.js +0 -21
- package/es/DragContent/index.d.ts +0 -14
- package/es/DragContent/index.js +0 -173
- package/es/DragContent/index.less +0 -44
- package/es/FormComp/ChunkUploader/api.js +0 -76
- package/es/FormComp/ChunkUploader/index.js +0 -391
- package/es/FormComp/ChunkUploader/lib.js +0 -96
- package/es/FormComp/ChunkUploader/style/style.less +0 -3
- package/es/FormComp/ChunkUploader/upload-queue.class.js +0 -167
- package/es/FormComp/ChunkUploader/worker.js +0 -23
- package/es/FormComp/EditButton/index.d.ts +0 -26
- package/es/FormComp/EditButton/index.js +0 -140
- package/es/FormComp/FieldComponent/ReUpload.d.ts +0 -3
- package/es/FormComp/FieldComponent/ReUpload.js +0 -131
- package/es/FormComp/FieldComponent/RefactorTreeSelect.js +0 -245
- package/es/FormComp/FieldComponent/TitleNode.d.ts +0 -6
- package/es/FormComp/FieldComponent/TitleNode.js +0 -9
- package/es/FormComp/FieldComponent/index.d.ts +0 -38
- package/es/FormComp/FieldComponent/index.js +0 -413
- package/es/FormComp/FieldComponent/setReadonlyValues.js +0 -236
- package/es/FormComp/FieldComponent/style/index.less +0 -116
- package/es/FormComp/RenderItemGroup/index.d.ts +0 -37
- package/es/FormComp/RenderItemGroup/index.js +0 -234
- package/es/FormComp/Uploader/index.d.ts +0 -19
- package/es/FormComp/Uploader/index.js +0 -275
- package/es/FormComp/Uploader/style/index.less +0 -14
- package/es/FormComp/Uploader/util.d.ts +0 -8
- package/es/FormComp/Uploader/util.js +0 -38
- package/es/FormComp/VarTemplate/index.js +0 -293
- package/es/FormComp/index.d.ts +0 -1
- package/es/FormComp/index.js +0 -1
- package/es/NavLeafScroll/index.js +0 -379
- package/es/NavLeafScroll/style/index.less +0 -119
- package/es/RefactorTree/data.d.ts +0 -7
- package/es/RefactorTree/index.d.ts +0 -40
- package/es/RefactorTree/index.js +0 -167
- package/es/RefactorTree/indexTreeNode.d.ts +0 -39
- package/es/RefactorTree/indexTreeNode.js +0 -237
- package/es/RefactorTree/style/index.d.ts +0 -1
- package/es/RefactorTree/style/index.js +0 -1
- package/es/RefactorTree/style/index.less +0 -22
- package/es/RefactorTree/util.d.ts +0 -42
- package/es/RefactorTree/util.js +0 -187
- package/es/SpecIcon/fonts/demo.css +0 -539
- package/es/SpecIcon/fonts/demo_index.html +0 -1315
- package/es/SpecIcon/fonts/iconfont.css +0 -211
- package/es/SpecIcon/fonts/iconfont.eot +0 -0
- package/es/SpecIcon/fonts/iconfont.js +0 -41
- package/es/SpecIcon/fonts/iconfont.json +0 -352
- package/es/SpecIcon/fonts/iconfont.svg +0 -173
- package/es/SpecIcon/fonts/iconfont.ttf +0 -0
- package/es/SpecIcon/fonts/iconfont.woff +0 -0
- package/es/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/es/SpecIcon/index.d.ts +0 -17
- package/es/SpecIcon/index.js +0 -77
- package/es/SpecIcon/style/iconfont.less +0 -213
- package/es/SpecIcon/style/index.less +0 -98
- package/es/SplitterLayout/Pane.d.ts +0 -13
- package/es/SplitterLayout/Pane.js +0 -36
- package/es/SplitterLayout/index.js +0 -375
- package/es/SplitterLayout/index.less +0 -58
- package/es/StandardContent/SplitterLayout/Pane.js +0 -50
- package/es/StandardContent/SplitterLayout/index.js +0 -374
- package/es/StandardContent/SplitterLayout/index.less +0 -58
- package/es/StandardContent/SubfieldContent.d.ts +0 -17
- package/es/StandardContent/SubfieldContent.js +0 -41
- package/es/StandardContent/WrapperContent.d.ts +0 -13
- package/es/StandardContent/WrapperContent.js +0 -29
- package/es/StandardContent/data.d.ts +0 -101
- package/es/StandardContent/style/index.less +0 -80
- package/es/StandardDragModal/index.d.ts +0 -11
- package/es/StandardDragModal/index.js +0 -30
- package/es/StandardFilter/index.d.ts +0 -35
- package/es/StandardFilter/index.js +0 -253
- package/es/StandardFilter/style/index.less +0 -62
- package/es/StandardForm/ActionList.js +0 -44
- package/es/StandardForm/StepForm.d.ts +0 -19
- package/es/StandardForm/StepForm.js +0 -267
- package/es/StandardForm/TabForm.d.ts +0 -19
- package/es/StandardForm/TabForm.js +0 -122
- package/es/StandardForm/index.d.ts +0 -32
- package/es/StandardForm/index.js +0 -170
- package/es/StandardForm/style/index.less +0 -58
- package/es/StandardModal/UpdateFormRef.js +0 -18
- package/es/StandardModal/index.d.ts +0 -44
- package/es/StandardModal/index.js +0 -495
- package/es/StandardModal/style/index.less +0 -50
- package/es/StandardPanel/index.d.ts +0 -28
- package/es/StandardPanel/index.js +0 -134
- package/es/StandardPanel/style/index.less +0 -135
- package/es/StandardTable/index.d.ts +0 -22
- package/es/StandardTable/index.js +0 -126
- package/es/StandardTable/style/index.d.ts +0 -1
- package/es/StandardTable/style/index.js +0 -1
- package/es/StandardTable/style/index.less +0 -206
- package/es/components/IconNode/index.d.ts +0 -16
- package/es/components/IconNode/index.js +0 -28
- package/es/components/index.d.ts +0 -2
- package/es/components/index.js +0 -2
- package/es/data/func.code.js +0 -112
- package/es/data/general.config.js +0 -172
- package/es/data/index.js +0 -3
- package/es/index.d.ts +0 -24
- package/es/index.js +0 -31
- package/es/styles/index.less +0 -0
- package/es/theme/spec-variable.less +0 -48
- package/es/utils/ValueFormat.js +0 -50
- package/es/utils/filterPermission.js +0 -111
- package/es/utils/getParentNodes.js +0 -215
- package/es/utils/index.js +0 -3
- package/lib/ButtonGroup/ButtonList.d.ts +0 -2
- package/lib/ButtonGroup/ButtonList.js +0 -55
- package/lib/ButtonGroup/ButtonMenu.d.ts +0 -2
- package/lib/ButtonGroup/ButtonMenu.js +0 -51
- package/lib/ButtonGroup/PopConfirmTitle.d.ts +0 -9
- package/lib/ButtonGroup/PopConfirmTitle.js +0 -48
- package/lib/ButtonGroup/index.d.ts +0 -30
- package/lib/ButtonGroup/index.js +0 -405
- package/lib/ButtonGroup/style/index.less +0 -36
- package/lib/DragContent/DragBar.js +0 -33
- package/lib/DragContent/index.d.ts +0 -14
- package/lib/DragContent/index.js +0 -191
- package/lib/DragContent/index.less +0 -44
- package/lib/FormComp/ChunkUploader/api.js +0 -89
- package/lib/FormComp/ChunkUploader/index.js +0 -410
- package/lib/FormComp/ChunkUploader/lib.js +0 -113
- package/lib/FormComp/ChunkUploader/style/style.less +0 -3
- package/lib/FormComp/ChunkUploader/upload-queue.class.js +0 -174
- package/lib/FormComp/ChunkUploader/worker.js +0 -28
- package/lib/FormComp/EditButton/index.d.ts +0 -26
- package/lib/FormComp/EditButton/index.js +0 -159
- package/lib/FormComp/FieldComponent/ReUpload.d.ts +0 -3
- package/lib/FormComp/FieldComponent/ReUpload.js +0 -151
- package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +0 -268
- package/lib/FormComp/FieldComponent/TitleNode.d.ts +0 -6
- package/lib/FormComp/FieldComponent/TitleNode.js +0 -19
- package/lib/FormComp/FieldComponent/index.d.ts +0 -38
- package/lib/FormComp/FieldComponent/index.js +0 -457
- package/lib/FormComp/FieldComponent/setReadonlyValues.js +0 -263
- package/lib/FormComp/FieldComponent/style/index.less +0 -116
- package/lib/FormComp/RenderItemGroup/index.d.ts +0 -37
- package/lib/FormComp/RenderItemGroup/index.js +0 -255
- package/lib/FormComp/Uploader/index.d.ts +0 -19
- package/lib/FormComp/Uploader/index.js +0 -301
- package/lib/FormComp/Uploader/style/index.less +0 -14
- package/lib/FormComp/Uploader/util.d.ts +0 -8
- package/lib/FormComp/Uploader/util.js +0 -47
- package/lib/FormComp/VarTemplate/index.js +0 -308
- package/lib/FormComp/index.d.ts +0 -1
- package/lib/FormComp/index.js +0 -15
- package/lib/NavLeafScroll/index.js +0 -397
- package/lib/NavLeafScroll/style/index.less +0 -119
- package/lib/RefactorTree/data.d.ts +0 -7
- package/lib/RefactorTree/index.d.ts +0 -40
- package/lib/RefactorTree/index.js +0 -190
- package/lib/RefactorTree/indexTreeNode.d.ts +0 -39
- package/lib/RefactorTree/indexTreeNode.js +0 -260
- package/lib/RefactorTree/style/index.d.ts +0 -1
- package/lib/RefactorTree/style/index.js +0 -3
- package/lib/RefactorTree/style/index.less +0 -22
- package/lib/RefactorTree/util.d.ts +0 -42
- package/lib/RefactorTree/util.js +0 -195
- package/lib/SpecIcon/fonts/demo.css +0 -539
- package/lib/SpecIcon/fonts/demo_index.html +0 -1315
- package/lib/SpecIcon/fonts/iconfont.css +0 -211
- package/lib/SpecIcon/fonts/iconfont.eot +0 -0
- package/lib/SpecIcon/fonts/iconfont.js +0 -43
- package/lib/SpecIcon/fonts/iconfont.json +0 -352
- package/lib/SpecIcon/fonts/iconfont.svg +0 -173
- package/lib/SpecIcon/fonts/iconfont.ttf +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/lib/SpecIcon/index.d.ts +0 -17
- package/lib/SpecIcon/index.js +0 -90
- package/lib/SpecIcon/style/iconfont.less +0 -213
- package/lib/SpecIcon/style/index.less +0 -98
- package/lib/SplitterLayout/Pane.d.ts +0 -13
- package/lib/SplitterLayout/Pane.js +0 -48
- package/lib/SplitterLayout/index.js +0 -386
- package/lib/SplitterLayout/index.less +0 -58
- package/lib/StandardContent/SplitterLayout/Pane.js +0 -62
- package/lib/StandardContent/SplitterLayout/index.js +0 -387
- package/lib/StandardContent/SplitterLayout/index.less +0 -58
- package/lib/StandardContent/SubfieldContent.d.ts +0 -17
- package/lib/StandardContent/SubfieldContent.js +0 -56
- package/lib/StandardContent/WrapperContent.d.ts +0 -13
- package/lib/StandardContent/WrapperContent.js +0 -43
- package/lib/StandardContent/data.d.ts +0 -101
- package/lib/StandardContent/style/index.less +0 -80
- package/lib/StandardDragModal/index.d.ts +0 -11
- package/lib/StandardDragModal/index.js +0 -43
- package/lib/StandardFilter/index.d.ts +0 -35
- package/lib/StandardFilter/index.js +0 -272
- package/lib/StandardFilter/style/index.less +0 -62
- package/lib/StandardForm/ActionList.js +0 -57
- package/lib/StandardForm/StepForm.d.ts +0 -19
- package/lib/StandardForm/StepForm.js +0 -295
- package/lib/StandardForm/TabForm.d.ts +0 -19
- package/lib/StandardForm/TabForm.js +0 -148
- package/lib/StandardForm/index.d.ts +0 -32
- package/lib/StandardForm/index.js +0 -197
- package/lib/StandardForm/style/index.less +0 -58
- package/lib/StandardModal/UpdateFormRef.js +0 -32
- package/lib/StandardModal/index.d.ts +0 -44
- package/lib/StandardModal/index.js +0 -525
- package/lib/StandardModal/style/index.less +0 -50
- package/lib/StandardPanel/index.d.ts +0 -28
- package/lib/StandardPanel/index.js +0 -155
- package/lib/StandardPanel/style/index.less +0 -135
- package/lib/StandardTable/index.d.ts +0 -22
- package/lib/StandardTable/index.js +0 -143
- package/lib/StandardTable/style/index.d.ts +0 -1
- package/lib/StandardTable/style/index.js +0 -3
- package/lib/StandardTable/style/index.less +0 -206
- package/lib/components/IconNode/index.d.ts +0 -16
- package/lib/components/IconNode/index.js +0 -39
- package/lib/components/index.d.ts +0 -2
- package/lib/components/index.js +0 -15
- package/lib/data/func.code.js +0 -119
- package/lib/data/general.config.js +0 -179
- package/lib/data/index.js +0 -23
- package/lib/index.d.ts +0 -24
- package/lib/index.js +0 -236
- package/lib/styles/index.less +0 -0
- package/lib/theme/spec-variable.less +0 -48
- package/lib/utils/ValueFormat.js +0 -58
- package/lib/utils/filterPermission.js +0 -127
- package/lib/utils/getParentNodes.js +0 -226
- package/lib/utils/index.js +0 -35
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2
|
-
|
|
3
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4
|
-
|
|
5
|
-
// eslint-disable-next-line import/no-webpack-loader-syntax
|
|
6
|
-
import Worker from 'worker-loader!./worker.js'; // 启动 Web Worker
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* 获取组件名称
|
|
10
|
-
* @param {ReactComponent} component
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
export function getComponentDisplayName(component) {
|
|
14
|
-
return component.displayName || component.name || 'Component';
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* 文件切分分片
|
|
18
|
-
* @param {File} file 文件
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
export function splitFileToChunks(file, perChunkSize) {
|
|
22
|
-
var fileSize = file.size;
|
|
23
|
-
var total = Math.ceil(fileSize / perChunkSize); // 计算总共要分多少片
|
|
24
|
-
|
|
25
|
-
var chunksArr = [];
|
|
26
|
-
|
|
27
|
-
for (var i = 1; i <= total; i++) {
|
|
28
|
-
chunksArr.push(file.slice((i - 1) * perChunkSize, i * perChunkSize));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
console.log('splitFileToChunks==》文件切分分片', chunksArr);
|
|
32
|
-
return chunksArr;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* 利用WebWorker计算文件内容的Hash
|
|
36
|
-
* @param {File} file 文件
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
export function calFileContentHash(_x) {
|
|
40
|
-
return _calFileContentHash.apply(this, arguments);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* 把字节数转化成更友好的显示(单位转化)
|
|
44
|
-
* @param {String} bytes 字节数
|
|
45
|
-
* @param {Number} precise 小数精度
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
function _calFileContentHash() {
|
|
49
|
-
_calFileContentHash = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(chunksArr) {
|
|
50
|
-
var worker;
|
|
51
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
52
|
-
while (1) {
|
|
53
|
-
switch (_context.prev = _context.next) {
|
|
54
|
-
case 0:
|
|
55
|
-
worker = new Worker();
|
|
56
|
-
worker.postMessage({
|
|
57
|
-
chunksArr: chunksArr
|
|
58
|
-
}); // 传递文件分片
|
|
59
|
-
|
|
60
|
-
/* 接受计算好的hash */
|
|
61
|
-
|
|
62
|
-
return _context.abrupt("return", new Promise(function (resolve) {
|
|
63
|
-
worker.onmessage = function (event) {
|
|
64
|
-
resolve(event.data.hash);
|
|
65
|
-
};
|
|
66
|
-
}));
|
|
67
|
-
|
|
68
|
-
case 3:
|
|
69
|
-
case "end":
|
|
70
|
-
return _context.stop();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}, _callee);
|
|
74
|
-
}));
|
|
75
|
-
return _calFileContentHash.apply(this, arguments);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export function bytesToSize(bytes) {
|
|
79
|
-
var precise = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
80
|
-
if (bytes === 0) return '0 B';
|
|
81
|
-
var k = 1024,
|
|
82
|
-
sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
|
|
83
|
-
i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
84
|
-
return (bytes / Math.pow(k, i)).toFixed(precise) + ' ' + sizes[i];
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* 生成guid
|
|
88
|
-
*/
|
|
89
|
-
|
|
90
|
-
export function guid() {
|
|
91
|
-
function S4() {
|
|
92
|
-
return ((1 + Math.random()) * 0x10000 | 0).toString(16).substring(1);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return "".concat(S4()).concat(S4(), "-").concat(S4(), "-").concat(S4(), "-").concat(S4(), "-").concat(S4()).concat(S4()).concat(S4());
|
|
96
|
-
}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2
|
-
|
|
3
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4
|
-
|
|
5
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
-
|
|
7
|
-
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."); }
|
|
8
|
-
|
|
9
|
-
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); }
|
|
10
|
-
|
|
11
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
12
|
-
|
|
13
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
14
|
-
|
|
15
|
-
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; }
|
|
16
|
-
|
|
17
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18
|
-
|
|
19
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
20
|
-
|
|
21
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
22
|
-
|
|
23
|
-
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; }
|
|
24
|
-
|
|
25
|
-
import { lockChunk, uploadChunk } from './api';
|
|
26
|
-
|
|
27
|
-
var UploadQueue = /*#__PURE__*/function () {
|
|
28
|
-
// 上传任务队列存储
|
|
29
|
-
// 是否正在上传
|
|
30
|
-
// 记录每个文件还剩下多少上传任务,作为判断文件是否完成上传的依据
|
|
31
|
-
// 文件完成上传的回调函数
|
|
32
|
-
function UploadQueue(_ref) {
|
|
33
|
-
var fileFinishCb = _ref.fileFinishCb;
|
|
34
|
-
|
|
35
|
-
_classCallCheck(this, UploadQueue);
|
|
36
|
-
|
|
37
|
-
_defineProperty(this, "uploadQueue", []);
|
|
38
|
-
|
|
39
|
-
_defineProperty(this, "isUploading", false);
|
|
40
|
-
|
|
41
|
-
_defineProperty(this, "tasksSizePerFile", {});
|
|
42
|
-
|
|
43
|
-
_defineProperty(this, "fileFinishCb", function () {});
|
|
44
|
-
|
|
45
|
-
if (!!fileFinishCb && typeof fileFinishCb === 'function') {
|
|
46
|
-
this.fileFinishCb = fileFinishCb;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* 建立上传队列,规则:
|
|
51
|
-
* 找出服务端记录里当前该文件所有状态为'wait'的文件分片
|
|
52
|
-
* @param {Object} fileInfo 文件上传情况
|
|
53
|
-
* @param {Array} chunksArr 分片数组
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
_createClass(UploadQueue, [{
|
|
58
|
-
key: "addChunksToQueue",
|
|
59
|
-
value: function addChunksToQueue(fileInfo, chunksArr) {
|
|
60
|
-
console.log('addChunksToQueue=>建立上传队列=>', fileInfo, chunksArr);
|
|
61
|
-
var newTasks = fileInfo.chunks.filter(function (chunk) {
|
|
62
|
-
return chunk.status === 'wait';
|
|
63
|
-
}).map(function (_, index) {
|
|
64
|
-
return {
|
|
65
|
-
hash: fileInfo.hash,
|
|
66
|
-
index: index,
|
|
67
|
-
chunk: chunksArr[index]
|
|
68
|
-
};
|
|
69
|
-
});
|
|
70
|
-
/* 添加上传任务到队列中 */
|
|
71
|
-
|
|
72
|
-
if (newTasks.length > 0) {
|
|
73
|
-
this.uploadQueue = [].concat(_toConsumableArray(this.uploadQueue), _toConsumableArray(newTasks));
|
|
74
|
-
this.tasksSizePerFile[newTasks[0].hash] = newTasks.length; // 记录当前文件有多少个上传任务
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* 触发上传
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
}, {
|
|
82
|
-
key: "run",
|
|
83
|
-
value: function run() {
|
|
84
|
-
if (!this.isUploading) {
|
|
85
|
-
this.isUploading = true;
|
|
86
|
-
this.uploadNext(); // 开始上传
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* 上传下一个分片
|
|
91
|
-
*/
|
|
92
|
-
|
|
93
|
-
}, {
|
|
94
|
-
key: "uploadNext",
|
|
95
|
-
value: function () {
|
|
96
|
-
var _uploadNext = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
97
|
-
var _this$uploadQueue$shi, chunkIndex, chunk, fileHash, lockResult;
|
|
98
|
-
|
|
99
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
100
|
-
while (1) {
|
|
101
|
-
switch (_context.prev = _context.next) {
|
|
102
|
-
case 0:
|
|
103
|
-
if (!(this.uploadQueue.length === 0)) {
|
|
104
|
-
_context.next = 3;
|
|
105
|
-
break;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
this.isUploading = false;
|
|
109
|
-
return _context.abrupt("return");
|
|
110
|
-
|
|
111
|
-
case 3:
|
|
112
|
-
_this$uploadQueue$shi = this.uploadQueue.shift(), chunkIndex = _this$uploadQueue$shi.index, chunk = _this$uploadQueue$shi.chunk, fileHash = _this$uploadQueue$shi.hash; // 从上传队列里取出一个上传任务
|
|
113
|
-
|
|
114
|
-
console.log('请求接口lockChunk=>给分片加锁,避免多个客户端上传同一个分片');
|
|
115
|
-
/* 给分片加锁,避免多个客户端上传同一个分片 */
|
|
116
|
-
|
|
117
|
-
_context.next = 7;
|
|
118
|
-
return lockChunk(fileHash, chunkIndex);
|
|
119
|
-
|
|
120
|
-
case 7:
|
|
121
|
-
lockResult = _context.sent;
|
|
122
|
-
|
|
123
|
-
if (!lockResult) {
|
|
124
|
-
_context.next = 16;
|
|
125
|
-
break;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
_context.next = 11;
|
|
129
|
-
return uploadChunk(fileHash, chunkIndex, chunk);
|
|
130
|
-
|
|
131
|
-
case 11:
|
|
132
|
-
console.log('请求接口uploadChunk=>上传分片文件,执行任务数递减', this.tasksSizePerFile);
|
|
133
|
-
/* 判断该文件的所有分片是否都上传完(任务数递减为0时) */
|
|
134
|
-
|
|
135
|
-
if (--this.tasksSizePerFile[fileHash] === 0) {
|
|
136
|
-
this.fileFinishCb(fileHash);
|
|
137
|
-
console.log('fileFinishCb=>该文件的所有分片已都上传完');
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
this.uploadNext();
|
|
141
|
-
_context.next = 17;
|
|
142
|
-
break;
|
|
143
|
-
|
|
144
|
-
case 16:
|
|
145
|
-
// 加锁失败,表示已有另一个客户端上传此分片,因此丢弃当前上传任务
|
|
146
|
-
this.uploadNext();
|
|
147
|
-
|
|
148
|
-
case 17:
|
|
149
|
-
case "end":
|
|
150
|
-
return _context.stop();
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}, _callee, this);
|
|
154
|
-
}));
|
|
155
|
-
|
|
156
|
-
function uploadNext() {
|
|
157
|
-
return _uploadNext.apply(this, arguments);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
return uploadNext;
|
|
161
|
-
}()
|
|
162
|
-
}]);
|
|
163
|
-
|
|
164
|
-
return UploadQueue;
|
|
165
|
-
}();
|
|
166
|
-
|
|
167
|
-
export { UploadQueue as default };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-restricted-globals */
|
|
2
|
-
import SparkMD5 from 'spark-md5';
|
|
3
|
-
self.addEventListener('message', function (e) {
|
|
4
|
-
var chunksArr = e.data.chunksArr; // 收到主线程传递来的文件分片
|
|
5
|
-
|
|
6
|
-
console.log('监听\'message\'收到主线程传递来的文件分片', chunksArr);
|
|
7
|
-
var spark = new SparkMD5.ArrayBuffer();
|
|
8
|
-
var fileReader = new FileReader();
|
|
9
|
-
fileReader.readAsArrayBuffer(chunksArr.pop());
|
|
10
|
-
console.log('创建文件读取', fileReader);
|
|
11
|
-
|
|
12
|
-
fileReader.onload = function (e) {
|
|
13
|
-
spark.append(e.target.result);
|
|
14
|
-
|
|
15
|
-
if (chunksArr.length === 0) {
|
|
16
|
-
self.postMessage({
|
|
17
|
-
hash: spark.end()
|
|
18
|
-
});
|
|
19
|
-
} else {
|
|
20
|
-
fileReader.readAsArrayBuffer(chunksArr.pop());
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
}, false);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react';
|
|
2
|
-
export interface EditButtonProps {
|
|
3
|
-
size?: any;
|
|
4
|
-
label?: string;
|
|
5
|
-
width?: number;
|
|
6
|
-
icon?: React.ReactNode;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
onChange?: (val: any) => void;
|
|
9
|
-
onSave?: (val: any) => void;
|
|
10
|
-
className?: string;
|
|
11
|
-
style?: React.CSSProperties;
|
|
12
|
-
}
|
|
13
|
-
export interface EditButtonState {
|
|
14
|
-
inputValue: string;
|
|
15
|
-
inputVisible: boolean;
|
|
16
|
-
}
|
|
17
|
-
declare class EditButton extends Component<EditButtonProps, EditButtonState> {
|
|
18
|
-
constructor(props: EditButtonProps);
|
|
19
|
-
private input;
|
|
20
|
-
handleClick: () => void;
|
|
21
|
-
saveInputRef: (input: any) => void;
|
|
22
|
-
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
23
|
-
handleInputConfirm: () => void;
|
|
24
|
-
render(): JSX.Element;
|
|
25
|
-
}
|
|
26
|
-
export default EditButton;
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
|
-
|
|
3
|
-
import "antd/es/button/style";
|
|
4
|
-
import _Button from "antd/es/button";
|
|
5
|
-
import "antd/es/input/style";
|
|
6
|
-
import _Input from "antd/es/input";
|
|
7
|
-
|
|
8
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
|
-
|
|
10
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
11
|
-
|
|
12
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
13
|
-
|
|
14
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
15
|
-
|
|
16
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
17
|
-
|
|
18
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
19
|
-
|
|
20
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
21
|
-
|
|
22
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23
|
-
|
|
24
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
25
|
-
|
|
26
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
27
|
-
|
|
28
|
-
import React, { Component } from 'react';
|
|
29
|
-
import classNames from 'classnames';
|
|
30
|
-
import { PlusOutlined } from '@ant-design/icons';
|
|
31
|
-
|
|
32
|
-
var EditButton = /*#__PURE__*/function (_Component) {
|
|
33
|
-
_inherits(EditButton, _Component);
|
|
34
|
-
|
|
35
|
-
var _super = _createSuper(EditButton);
|
|
36
|
-
|
|
37
|
-
function EditButton(props) {
|
|
38
|
-
var _this;
|
|
39
|
-
|
|
40
|
-
_classCallCheck(this, EditButton);
|
|
41
|
-
|
|
42
|
-
_this = _super.call(this, props);
|
|
43
|
-
|
|
44
|
-
_this.handleClick = function () {
|
|
45
|
-
_this.setState({
|
|
46
|
-
inputVisible: true
|
|
47
|
-
}, function () {
|
|
48
|
-
return _this.input.focus();
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
_this.saveInputRef = function (input) {
|
|
53
|
-
_this.input = input;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
_this.handleInputChange = function (e) {
|
|
57
|
-
_this.setState({
|
|
58
|
-
inputValue: e.target.value
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
_this.handleInputConfirm = function () {
|
|
63
|
-
var _this$props = _this.props,
|
|
64
|
-
onSave = _this$props.onSave,
|
|
65
|
-
onChange = _this$props.onChange;
|
|
66
|
-
var inputValue = _this.state.inputValue;
|
|
67
|
-
if (onSave) onSave(inputValue);
|
|
68
|
-
if (onChange) onChange(inputValue);
|
|
69
|
-
|
|
70
|
-
_this.setState({
|
|
71
|
-
inputVisible: false,
|
|
72
|
-
inputValue: ''
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
_this.state = {
|
|
77
|
-
inputValue: '',
|
|
78
|
-
inputVisible: false
|
|
79
|
-
};
|
|
80
|
-
return _this;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
_createClass(EditButton, [{
|
|
84
|
-
key: "render",
|
|
85
|
-
value: function render() {
|
|
86
|
-
var _this2 = this;
|
|
87
|
-
|
|
88
|
-
var _this$props2 = this.props,
|
|
89
|
-
_this$props2$size = _this$props2.size,
|
|
90
|
-
size = _this$props2$size === void 0 ? 'middle' : _this$props2$size,
|
|
91
|
-
label = _this$props2.label,
|
|
92
|
-
_this$props2$icon = _this$props2.icon,
|
|
93
|
-
icon = _this$props2$icon === void 0 ? /*#__PURE__*/React.createElement(PlusOutlined, null) : _this$props2$icon,
|
|
94
|
-
style = _this$props2.style,
|
|
95
|
-
className = _this$props2.className,
|
|
96
|
-
disabled = _this$props2.disabled,
|
|
97
|
-
_this$props2$width = _this$props2.width,
|
|
98
|
-
width = _this$props2$width === void 0 ? 106 : _this$props2$width;
|
|
99
|
-
var _this$state = this.state,
|
|
100
|
-
inputValue = _this$state.inputValue,
|
|
101
|
-
inputVisible = _this$state.inputVisible;
|
|
102
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
103
|
-
style: Object.assign({
|
|
104
|
-
display: 'inline-block',
|
|
105
|
-
width: "".concat(width, "px"),
|
|
106
|
-
verticalAlign: 'middle'
|
|
107
|
-
}, style),
|
|
108
|
-
className: classNames(className, 'spec-edit-button')
|
|
109
|
-
}, inputVisible ? /*#__PURE__*/React.createElement(_Input, {
|
|
110
|
-
ref: this.saveInputRef,
|
|
111
|
-
type: "text",
|
|
112
|
-
size: size,
|
|
113
|
-
style: {
|
|
114
|
-
width: '100%'
|
|
115
|
-
},
|
|
116
|
-
value: inputValue,
|
|
117
|
-
onChange: this.handleInputChange,
|
|
118
|
-
onBlur: function onBlur() {
|
|
119
|
-
return _this2.handleInputConfirm();
|
|
120
|
-
},
|
|
121
|
-
onPressEnter: function onPressEnter() {
|
|
122
|
-
return _this2.handleInputConfirm();
|
|
123
|
-
}
|
|
124
|
-
}) : /*#__PURE__*/React.createElement(_Button, {
|
|
125
|
-
disabled: disabled,
|
|
126
|
-
icon: icon,
|
|
127
|
-
size: size,
|
|
128
|
-
style: {
|
|
129
|
-
borderStyle: 'dashed',
|
|
130
|
-
width: '100%'
|
|
131
|
-
},
|
|
132
|
-
onClick: this.handleClick
|
|
133
|
-
}, label));
|
|
134
|
-
}
|
|
135
|
-
}]);
|
|
136
|
-
|
|
137
|
-
return EditButton;
|
|
138
|
-
}(Component);
|
|
139
|
-
|
|
140
|
-
export default EditButton;
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import "antd/es/upload/style";
|
|
2
|
-
import _Upload from "antd/es/upload";
|
|
3
|
-
|
|
4
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
|
-
|
|
6
|
-
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."); }
|
|
7
|
-
|
|
8
|
-
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); }
|
|
9
|
-
|
|
10
|
-
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; }
|
|
11
|
-
|
|
12
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_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; }
|
|
13
|
-
|
|
14
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
-
|
|
16
|
-
import { __awaiter, __rest } from "tslib";
|
|
17
|
-
import React, { useCallback, useEffect, useState } from "react";
|
|
18
|
-
import StandardModal from "../../StandardModal/index";
|
|
19
|
-
|
|
20
|
-
function getBase64(file) {
|
|
21
|
-
return new Promise(function (resolve, reject) {
|
|
22
|
-
var reader = new FileReader();
|
|
23
|
-
reader.readAsDataURL(file);
|
|
24
|
-
|
|
25
|
-
reader.onload = function () {
|
|
26
|
-
return resolve(reader.result);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
reader.onerror = function (error) {
|
|
30
|
-
return reject(error);
|
|
31
|
-
};
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
var ReUpload = /*#__PURE__*/React.forwardRef(function (deProps, ref) {
|
|
36
|
-
var viewOnly = deProps.viewOnly,
|
|
37
|
-
onChange = deProps.onChange,
|
|
38
|
-
value = deProps.value,
|
|
39
|
-
otherProps = __rest(deProps, ["viewOnly", "onChange", "value"]);
|
|
40
|
-
|
|
41
|
-
var _useState = useState(),
|
|
42
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
43
|
-
fileList = _useState2[0],
|
|
44
|
-
setFileList = _useState2[1];
|
|
45
|
-
|
|
46
|
-
var _useState3 = useState({
|
|
47
|
-
previewVisible: false,
|
|
48
|
-
previewImage: '',
|
|
49
|
-
previewTitle: ''
|
|
50
|
-
}),
|
|
51
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
52
|
-
previewConfig = _useState4[0],
|
|
53
|
-
setPreviewConfig = _useState4[1];
|
|
54
|
-
|
|
55
|
-
useEffect(function () {
|
|
56
|
-
setFileList(value);
|
|
57
|
-
}, [value]);
|
|
58
|
-
|
|
59
|
-
var handlePreview = function handlePreview(file) {
|
|
60
|
-
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
61
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
62
|
-
while (1) {
|
|
63
|
-
switch (_context.prev = _context.next) {
|
|
64
|
-
case 0:
|
|
65
|
-
if (!(!file.url && !file.preview)) {
|
|
66
|
-
_context.next = 4;
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
_context.next = 3;
|
|
71
|
-
return getBase64(file.originFileObj);
|
|
72
|
-
|
|
73
|
-
case 3:
|
|
74
|
-
file.preview = _context.sent;
|
|
75
|
-
|
|
76
|
-
case 4:
|
|
77
|
-
setPreviewConfig({
|
|
78
|
-
previewImage: file.url || file.preview,
|
|
79
|
-
previewVisible: true,
|
|
80
|
-
previewTitle: file.name || file.url.substring(file.url.lastIndexOf('/') + 1)
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
case 5:
|
|
84
|
-
case "end":
|
|
85
|
-
return _context.stop();
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}, _callee);
|
|
89
|
-
}));
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
var uploadChange = useCallback(function (_ref) {
|
|
93
|
-
var file = _ref.file,
|
|
94
|
-
fileList = _ref.fileList,
|
|
95
|
-
event = _ref.event;
|
|
96
|
-
setFileList(fileList);
|
|
97
|
-
onChange && onChange(fileList, {
|
|
98
|
-
file: file,
|
|
99
|
-
fileList: fileList,
|
|
100
|
-
event: event
|
|
101
|
-
});
|
|
102
|
-
}, [setFileList]);
|
|
103
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Upload, Object.assign({}, otherProps, {
|
|
104
|
-
fileList: fileList,
|
|
105
|
-
onPreview: handlePreview,
|
|
106
|
-
onChange: uploadChange,
|
|
107
|
-
ref: ref,
|
|
108
|
-
className: viewOnly ? 'upload-viewonly' : ''
|
|
109
|
-
})), /*#__PURE__*/React.createElement(StandardModal, {
|
|
110
|
-
visible: previewConfig.previewVisible,
|
|
111
|
-
hideFooter: true,
|
|
112
|
-
onCancel: function onCancel() {
|
|
113
|
-
return setPreviewConfig({
|
|
114
|
-
previewVisible: false,
|
|
115
|
-
previewImage: '',
|
|
116
|
-
previewTitle: ''
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
120
|
-
style: {
|
|
121
|
-
textAlign: 'center'
|
|
122
|
-
}
|
|
123
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
124
|
-
style: {
|
|
125
|
-
maxWidth: '100%'
|
|
126
|
-
},
|
|
127
|
-
src: previewConfig.previewImage,
|
|
128
|
-
alt: ""
|
|
129
|
-
}))));
|
|
130
|
-
});
|
|
131
|
-
export default ReUpload;
|