@titaui/pc 1.13.1 → 1.13.2-beta.1
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/components/checkbox-list/index.css +18 -0
- package/lib/components/checkbox-list/index.js +66 -0
- package/lib/components/dialog-qq-docs/index.css +90 -0
- package/lib/components/dialog-qq-docs/index.js +488 -0
- package/lib/components/dialog-qq-docs/request-apis.js +16 -0
- package/lib/components/dialog-qq-docs/utils.js +76 -0
- package/lib/components/dialog-select/index.css +9 -0
- package/lib/components/dialog-select/index.js +48 -0
- package/lib/components/dialog-upload-type/assets/folder.svg +20 -0
- package/lib/components/dialog-upload-type/assets/qq-docs.svg +20 -0
- package/lib/components/dialog-upload-type/components/upload-type-item/index.css +14 -0
- package/lib/components/dialog-upload-type/components/upload-type-item/index.js +36 -0
- package/lib/components/dialog-upload-type/index.css +7 -0
- package/lib/components/dialog-upload-type/index.js +75 -0
- package/lib/components/file-list/components/single-file/index.js +3 -1
- package/lib/components/file-list/index.js +2 -1
- package/lib/components/file-preview/index.css +37 -0
- package/lib/components/file-preview/index.js +68 -0
- package/lib/components/loading/assets/loading.gif +0 -0
- package/lib/components/loading/index.css +23 -0
- package/lib/components/loading/index.js +30 -0
- package/lib/components/nav/index.css +23 -0
- package/lib/components/nav/index.js +31 -0
- package/lib/components/nav-top/components/app-center/index.css +1 -1
- package/lib/components/nav-top/components/menu/index.js +15 -15
- package/lib/components/nav-top/index.js +19 -4
- package/lib/components/scroll-container/index.js +27 -6
- package/lib/components/search-input/index.js +3 -0
- package/lib/components/upload/index.js +260 -456
- package/lib/components/upload/upload.js +555 -0
- package/lib/utils/tools.js +11 -1
- package/package.json +1 -1
|
@@ -11,25 +11,27 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _titaUi = require("tita-ui");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _dialogUploadType = _interopRequireDefault(require("../dialog-upload-type"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _dialogQqDocs = _interopRequireDefault(require("../dialog-qq-docs"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _getLocale = require("../../utils/getLocale");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _Portals = _interopRequireDefault(require("../../components-v1/portals/Portals"));
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _upload = _interopRequireDefault(require("../upload/upload"));
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
require("./index.css");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _utils = require("../dialog-qq-docs/utils");
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _platform = require("../../utils/platform");
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _uploadedPreview = _interopRequireDefault(require("./components/uploadedPreview"));
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _tools = require("../../utils/tools");
|
|
33
|
+
|
|
34
|
+
var _excluded = ["children", "onlyLocal", "attachmentTipText"];
|
|
33
35
|
|
|
34
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
37
|
|
|
@@ -37,505 +39,307 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
37
39
|
|
|
38
40
|
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; }
|
|
39
41
|
|
|
40
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
41
|
-
|
|
42
|
-
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."); }
|
|
43
|
-
|
|
44
|
-
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); }
|
|
45
|
-
|
|
46
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
47
|
-
|
|
48
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
49
|
-
|
|
50
|
-
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; }
|
|
51
|
-
|
|
52
42
|
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; }
|
|
53
43
|
|
|
54
44
|
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; }
|
|
55
45
|
|
|
56
46
|
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; }
|
|
57
47
|
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
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); } }
|
|
61
|
-
|
|
62
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
63
|
-
|
|
64
|
-
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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
48
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
65
49
|
|
|
66
|
-
function
|
|
50
|
+
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."); }
|
|
67
51
|
|
|
68
|
-
function
|
|
52
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
69
53
|
|
|
70
|
-
function
|
|
54
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
71
55
|
|
|
72
|
-
function
|
|
56
|
+
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); } }
|
|
73
57
|
|
|
74
|
-
function
|
|
58
|
+
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); }); }; }
|
|
75
59
|
|
|
76
|
-
function
|
|
60
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
77
61
|
|
|
78
|
-
|
|
79
|
-
_inherits(Upload, _PureComponent);
|
|
62
|
+
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."); }
|
|
80
63
|
|
|
81
|
-
|
|
64
|
+
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); }
|
|
82
65
|
|
|
83
|
-
|
|
84
|
-
var _this;
|
|
66
|
+
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; }
|
|
85
67
|
|
|
86
|
-
|
|
68
|
+
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; }
|
|
87
69
|
|
|
88
|
-
|
|
70
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
89
71
|
|
|
90
|
-
|
|
91
|
-
var fileInput = _this.refs.fileInput; // @ts-ignore
|
|
72
|
+
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; }
|
|
92
73
|
|
|
93
|
-
|
|
94
|
-
// @ts-ignore
|
|
74
|
+
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; }
|
|
95
75
|
|
|
96
|
-
|
|
76
|
+
/** 是否开启腾讯文档选项 */
|
|
77
|
+
var openTencentDocFile = window.BSGlobal && window.BSGlobal.TenantAdvancedSetting.TenantFunAdvancedSetting.TencentDocFile && // 默认在钉钉环境下禁用
|
|
78
|
+
!(0, _platform.isDD)(true);
|
|
97
79
|
|
|
98
|
-
|
|
80
|
+
var onDefaultSubmit = function onDefaultSubmit() {};
|
|
99
81
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
82
|
+
var UploadMode = function UploadMode(_ref) {
|
|
83
|
+
var children = _ref.children,
|
|
84
|
+
_ref$onlyLocal = _ref.onlyLocal,
|
|
85
|
+
onlyLocal = _ref$onlyLocal === void 0 ? !openTencentDocFile : _ref$onlyLocal,
|
|
86
|
+
_ref$attachmentTipTex = _ref.attachmentTipText,
|
|
87
|
+
attachmentTipText = _ref$attachmentTipTex === void 0 ? (0, _getLocale.getLocale)('OKR_MyO_KRP_Draganddropu') : _ref$attachmentTipTex,
|
|
88
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
105
89
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
var _this$props = _this.props,
|
|
111
|
-
action = _this$props.action,
|
|
112
|
-
fileNumLimit = _this$props.fileNumLimit,
|
|
113
|
-
fileSizeLimit = _this$props.fileSizeLimit,
|
|
114
|
-
filesTotal = _this$props.filesTotal;
|
|
115
|
-
var uploadSelectFilesLen = uploadSelectFilesObj.length; // 选中上传的文件数量
|
|
90
|
+
var _useState = (0, _react.useState)(),
|
|
91
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
92
|
+
defaultQQDocsData = _useState2[0],
|
|
93
|
+
setDefaultQQDocsData = _useState2[1]; // 区分存储腾讯文档数据和本地文件
|
|
116
94
|
|
|
117
|
-
var uploadSuccessFilesLen = uploadSuccessFiles.length; // 已上传成功的文件数量
|
|
118
95
|
|
|
119
|
-
|
|
96
|
+
var _useState3 = (0, _react.useState)([]),
|
|
97
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
98
|
+
qqFileData = _useState4[0],
|
|
99
|
+
setQQFileData = _useState4[1];
|
|
120
100
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
});
|
|
101
|
+
var _useState5 = (0, _react.useState)([]),
|
|
102
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
103
|
+
localFileData = _useState6[0],
|
|
104
|
+
setLocalFileData = _useState6[1];
|
|
126
105
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
106
|
+
var _useState7 = (0, _react.useState)([]),
|
|
107
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
108
|
+
allFileData = _useState8[0],
|
|
109
|
+
setAllFileData = _useState8[1];
|
|
130
110
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
111
|
+
var onSubmit = restProps.onSubmit;
|
|
112
|
+
(0, _react.useEffect)(function () {
|
|
113
|
+
function handleMessage(event) {
|
|
114
|
+
var origin = event.origin;
|
|
115
|
+
console.log('origin', origin); // 腾讯授权完成通知
|
|
135
116
|
|
|
136
|
-
|
|
117
|
+
if (event.data.tencentAuthSuccess) {
|
|
118
|
+
console.log('授权完成');
|
|
137
119
|
}
|
|
120
|
+
}
|
|
138
121
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
122
|
+
if (typeof window.addEventListener !== 'undefined') {
|
|
123
|
+
window.addEventListener('message', handleMessage, false);
|
|
124
|
+
} else if (typeof window.attachEvent !== 'undefined') {
|
|
125
|
+
window.attachEvent('onmessage', handleMessage);
|
|
126
|
+
}
|
|
143
127
|
|
|
144
|
-
|
|
128
|
+
return function () {
|
|
129
|
+
if (typeof window.removeEventListener !== 'undefined') {
|
|
130
|
+
window.removeEventListener('message', handleMessage);
|
|
131
|
+
} else if (typeof window.detachEvent !== 'undefined') {
|
|
132
|
+
window.detachEvent('onmessage', handleMessage);
|
|
145
133
|
}
|
|
146
|
-
|
|
147
|
-
if (!uploadSelectFilesObj.length) return;
|
|
148
|
-
var uploadSelectFilesSize = uploadSelectFilesObj.map(function (item) {
|
|
149
|
-
return item.size;
|
|
150
|
-
}).reduce(function (total, num) {
|
|
151
|
-
return total + num;
|
|
152
|
-
}); // 上传文件的大小
|
|
153
|
-
|
|
154
|
-
if (uploadSelectFilesSize > fileNumLimit * fileSizeLimit * 1024 * 1024) return _toast["default"].Error("\u5355\u6B21\u6700\u591A\u53EF\u4E0A\u4F20 ".concat(fileNumLimit, " \u4E2A\u6587\u4EF6\uFF0C\u6BCF\u4E2A\u4E0D\u8D85\u8FC7 ").concat(fileSizeLimit, "M")); // 文件大小超出限制
|
|
155
|
-
|
|
156
|
-
var uploadStartFiles = []; // 开始上传的文件
|
|
157
|
-
|
|
158
|
-
uploadSelectFilesObj.forEach(function (element, index) {
|
|
159
|
-
var formData = new FormData(); // FormData 对象
|
|
160
|
-
|
|
161
|
-
var uploadStartFile = null;
|
|
162
|
-
var timestamp = new Date().getTime(); // 给每个文件加一个时间戳
|
|
163
|
-
|
|
164
|
-
var uploadFileType = element.name.substring(element.name.lastIndexOf('.') + 1);
|
|
165
|
-
uploadStartFile = {
|
|
166
|
-
FileName: element.name,
|
|
167
|
-
FileType: (0, _type._dealAttachmentType)(uploadFileType).FileType,
|
|
168
|
-
FileSize: element.size,
|
|
169
|
-
FileLastModified: element.lastModified,
|
|
170
|
-
IsImage: (0, _type._dealAttachmentType)(uploadFileType).IsImage,
|
|
171
|
-
percentComplete: 0,
|
|
172
|
-
uploadStatus: 1,
|
|
173
|
-
// 开始上传
|
|
174
|
-
IsSuccess: false,
|
|
175
|
-
uid: (0, _uuid["default"])(),
|
|
176
|
-
_smallImageUrl: '',
|
|
177
|
-
_bigImageUrl: '',
|
|
178
|
-
MediaType: '',
|
|
179
|
-
UserId: 0,
|
|
180
|
-
MaxDocCount: 0,
|
|
181
|
-
DfsPath: '',
|
|
182
|
-
ClientUrl: '',
|
|
183
|
-
SmallImageUrl: '',
|
|
184
|
-
BigImageUrl: '',
|
|
185
|
-
DownloadUrl: '',
|
|
186
|
-
Msg: '',
|
|
187
|
-
AllowUploadAttachmentSize: 50,
|
|
188
|
-
Deleteable: true,
|
|
189
|
-
requestXHR: new XMLHttpRequest() // 在这创建是为了取消用
|
|
190
|
-
|
|
191
|
-
};
|
|
192
|
-
var sameFile = uploadSuccessFiles.find(function (file) {
|
|
193
|
-
return _this.isSameFile(file, uploadStartFile) && file.uploadStatus !== 4;
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
if (sameFile) {
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
uploadStartFiles.push(uploadStartFile);
|
|
201
|
-
|
|
202
|
-
_this._dealUploadStart(uploadStartFiles); // 处理开始上传的文件
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
formData.append('file', element);
|
|
206
|
-
var url = action || (0, _requestV.getApiUrl)("Upload/PostFiles?format=json×tamp=".concat(timestamp));
|
|
207
|
-
|
|
208
|
-
_this._dealUploadXHRRequest(formData, url, uploadStartFile);
|
|
209
|
-
});
|
|
210
134
|
};
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
// };
|
|
246
|
-
|
|
247
|
-
xhr.onreadystatechange = function () {
|
|
248
|
-
if (xhr.readyState == 4 && xhr.status == 200) {
|
|
249
|
-
var result = Object.assign({}, _objectSpread({}, JSON.parse(xhr.responseText).Result[0])); // 上传成功接口返回数据
|
|
250
|
-
|
|
251
|
-
result.percentComplete = 100;
|
|
252
|
-
result.IsSuccess = !!result.IsSuccess;
|
|
253
|
-
result.uploadStatus = result.IsSuccess ? 3 : 4; // 3上传成功;4上传失败
|
|
254
|
-
|
|
255
|
-
_this._dealUploadSuccess(_objectSpread(_objectSpread({}, uploadStartFile), result));
|
|
256
|
-
}
|
|
257
|
-
}; //进度条部分
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
xhr.upload.onprogress = function (evt) {
|
|
261
|
-
var uploadSuccessFiles = JSON.parse(JSON.stringify(_this.state.uploadSuccessFiles));
|
|
262
|
-
|
|
263
|
-
if (evt.lengthComputable) {
|
|
264
|
-
uploadSuccessFiles.forEach(function (item) {
|
|
265
|
-
if (_this.isSameFile(item, uploadStartFile)) {
|
|
266
|
-
item.uploadStatus = 2; // 上传中
|
|
267
|
-
|
|
268
|
-
item.percentComplete = Math.round(evt.loaded * 100 / evt.total);
|
|
135
|
+
}, []);
|
|
136
|
+
|
|
137
|
+
var _useState9 = (0, _react.useState)(false),
|
|
138
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
139
|
+
dialogUploadTypeVidible = _useState10[0],
|
|
140
|
+
setDialogUploadTypeVidible = _useState10[1];
|
|
141
|
+
|
|
142
|
+
var onShowDialogUploadType = (0, _react.useCallback)(function () {
|
|
143
|
+
setDialogUploadTypeVidible(true);
|
|
144
|
+
}, []);
|
|
145
|
+
var onHideDialogUploadType = (0, _react.useCallback)(function () {
|
|
146
|
+
setDialogUploadTypeVidible(false);
|
|
147
|
+
}, []);
|
|
148
|
+
|
|
149
|
+
var _useState11 = (0, _react.useState)(false),
|
|
150
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
151
|
+
dialogQQDocsVidible = _useState12[0],
|
|
152
|
+
setDialogQQDocsVidible = _useState12[1];
|
|
153
|
+
|
|
154
|
+
var onShowDialogQQDocs = (0, _react.useCallback)( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
155
|
+
var data;
|
|
156
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
157
|
+
while (1) {
|
|
158
|
+
switch (_context.prev = _context.next) {
|
|
159
|
+
case 0:
|
|
160
|
+
_context.next = 2;
|
|
161
|
+
return (0, _utils.checkTencentAuth)({});
|
|
162
|
+
|
|
163
|
+
case 2:
|
|
164
|
+
data = _context.sent;
|
|
165
|
+
|
|
166
|
+
if (data) {
|
|
167
|
+
_context.next = 5;
|
|
168
|
+
break;
|
|
269
169
|
}
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
_this.setState({
|
|
273
|
-
uploadSuccessFiles: uploadSuccessFiles
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
xhr.upload.onerror = function (evt) {
|
|
279
|
-
var uploadSuccessFiles = _toConsumableArray(_this.state.uploadSuccessFiles);
|
|
280
|
-
|
|
281
|
-
uploadSuccessFiles.forEach(function (item) {
|
|
282
|
-
if (_this.isSameFile(item, uploadStartFile)) {
|
|
283
|
-
item.uploadStatus = 4; // 上传失败
|
|
284
170
|
|
|
285
|
-
|
|
286
|
-
item.Msg = '网络异常,请重新上传';
|
|
287
|
-
}
|
|
288
|
-
});
|
|
171
|
+
return _context.abrupt("return");
|
|
289
172
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
173
|
+
case 5:
|
|
174
|
+
// 设置默认的文档数据,避免在弹窗内部再查询一次
|
|
175
|
+
setDefaultQQDocsData(data);
|
|
176
|
+
setDialogUploadTypeVidible(false);
|
|
177
|
+
setDialogQQDocsVidible(true);
|
|
294
178
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
_this._dealUploadStart = function (uploadStartFiles) {
|
|
300
|
-
var uploadSuccessFiles = [];
|
|
301
|
-
|
|
302
|
-
var uploadedFiles = _toConsumableArray(_this.state.uploadSuccessFiles); // 处理重传文件,直接展开会导致同样的文件展示两个
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
var uploadFilesConcatArr = uploadedFiles;
|
|
306
|
-
var isReloadFile = uploadFilesConcatArr.filter(function (item) {
|
|
307
|
-
return _this.isSameFile(item, uploadStartFiles[0]);
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
if (!isReloadFile || isReloadFile.length === 0) {
|
|
311
|
-
uploadFilesConcatArr = [].concat(_toConsumableArray(uploadedFiles), _toConsumableArray(uploadStartFiles));
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
uploadFilesConcatArr.forEach(function (item) {
|
|
315
|
-
var res = uploadSuccessFiles.filter(function (v) {
|
|
316
|
-
return _this.isSameFile(item, v);
|
|
317
|
-
});
|
|
318
|
-
uploadSuccessFiles.forEach(function (element) {
|
|
319
|
-
if (_this.isSameFile(item, element)) {
|
|
320
|
-
element = item;
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
if (res.length === 0) {
|
|
325
|
-
uploadSuccessFiles.push(item);
|
|
179
|
+
case 8:
|
|
180
|
+
case "end":
|
|
181
|
+
return _context.stop();
|
|
326
182
|
}
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
_this.setState({
|
|
330
|
-
uploadSuccessFiles: uploadSuccessFiles
|
|
331
|
-
});
|
|
332
|
-
};
|
|
333
|
-
|
|
334
|
-
_this._dealUploadSuccess = function (uploadSuccessFile) {
|
|
335
|
-
var onSubmit = _this.props.onSubmit;
|
|
336
|
-
|
|
337
|
-
var uploadSuccessFiles = _toConsumableArray(_this.state.uploadSuccessFiles);
|
|
338
|
-
|
|
339
|
-
var uploadSuccessFilesFormat = uploadSuccessFiles.map(function (element) {
|
|
340
|
-
return _this.isSameFile(uploadSuccessFile, element) ? uploadSuccessFile : element;
|
|
341
|
-
});
|
|
342
|
-
var uploadSuccessFilesPath = uploadSuccessFilesFormat.map(function (item) {
|
|
343
|
-
return item.DfsPath;
|
|
344
|
-
}); // 获取文件上传后返回的路径
|
|
345
|
-
|
|
346
|
-
onSubmit(uploadSuccessFilesPath); // 将上传完成的文件路径传递给父组件
|
|
347
|
-
|
|
348
|
-
_this.setState({
|
|
349
|
-
uploadSuccessFiles: uploadSuccessFilesFormat,
|
|
350
|
-
attachmentPreviewUrl: (0, _util.getPreviewImgs)(uploadSuccessFilesFormat)
|
|
351
|
-
});
|
|
352
|
-
};
|
|
353
|
-
|
|
354
|
-
_this.isImg = function (fileType) {
|
|
355
|
-
if (/^(jpg|png|gif|jpeg|image|JPG|PNG|GIF|JPEG)$/.test(fileType)) {
|
|
356
|
-
return true;
|
|
357
183
|
}
|
|
184
|
+
}, _callee);
|
|
185
|
+
})), []);
|
|
186
|
+
var onHideDialogQQDocs = (0, _react.useCallback)(function () {
|
|
187
|
+
setDialogQQDocsVidible(false);
|
|
188
|
+
}, []);
|
|
189
|
+
|
|
190
|
+
if (onlyLocal) {
|
|
191
|
+
return /*#__PURE__*/_react["default"].createElement(_upload["default"], restProps, children);
|
|
192
|
+
}
|
|
358
193
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
194
|
+
(0, _react.useEffect)(function () {
|
|
195
|
+
var filePaths = allFileData.map(function (_ref3) {
|
|
196
|
+
var type = _ref3.type,
|
|
197
|
+
fileData = _ref3.fileData;
|
|
198
|
+
|
|
199
|
+
if (type === 'qq') {
|
|
200
|
+
// 需要返回 url|type|title|tencentdoc 格式的字符串数组
|
|
201
|
+
var url = fileData.url,
|
|
202
|
+
_type = fileData.type,
|
|
203
|
+
title = fileData.title;
|
|
204
|
+
return "".concat(url, "|").concat(_type, "|").concat(title, "|tencentdoc");
|
|
370
205
|
}
|
|
371
206
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
_this.handlerUploadPreviewOptions = function (index, options) {
|
|
376
|
-
var _this$props2 = _this.props,
|
|
377
|
-
onSubmit = _this$props2.onSubmit,
|
|
378
|
-
onDelete = _this$props2.onDelete;
|
|
379
|
-
|
|
380
|
-
if (options === 'cancel') {
|
|
381
|
-
var reUploadFileInfo = _this.state.uploadSuccessFiles[index];
|
|
382
|
-
reUploadFileInfo.requestXHR.abort();
|
|
207
|
+
if (type === 'local') {
|
|
208
|
+
return fileData.DfsPath;
|
|
383
209
|
}
|
|
384
210
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
211
|
+
return '';
|
|
212
|
+
});
|
|
213
|
+
if (onSubmit) onSubmit(filePaths);
|
|
214
|
+
}, [allFileData]);
|
|
215
|
+
(0, _react.useEffect)(function () {
|
|
216
|
+
console.log('allFileData', _toConsumableArray(allFileData));
|
|
217
|
+
console.log('localFileData', _toConsumableArray(localFileData)); // upload 组件返回的是选择的所有文件对象,需要对其进行重新排序
|
|
218
|
+
|
|
219
|
+
var localFileListKeys = allFileData.filter(function (_ref4) {
|
|
220
|
+
var type = _ref4.type;
|
|
221
|
+
return type === 'local';
|
|
222
|
+
}).map(function (_ref5) {
|
|
223
|
+
var key = _ref5.key;
|
|
224
|
+
return key;
|
|
225
|
+
}); // 递归查找第一个不存在的 key
|
|
226
|
+
|
|
227
|
+
var sliceStartIndex = localFileData.findIndex(function (item) {
|
|
228
|
+
return !localFileListKeys.includes(item.uid);
|
|
229
|
+
}); // 然后从该位置开始截取并追加到 allFileData
|
|
230
|
+
|
|
231
|
+
var newLocalFile = sliceStartIndex === -1 ? [] : localFileData.slice(sliceStartIndex);
|
|
232
|
+
console.log('sliceStartIndex', sliceStartIndex);
|
|
233
|
+
console.log('newLocalFile', newLocalFile); // 追加
|
|
234
|
+
// 由于 upload 内部使用了 setTimeout,导致 onLocalUploadSuccessHandler 没有被更新,allFileData 取到的是旧的
|
|
235
|
+
|
|
236
|
+
setAllFileData([].concat(_toConsumableArray(allFileData), _toConsumableArray(newLocalFile.map(function (item) {
|
|
237
|
+
return {
|
|
238
|
+
key: item.uid,
|
|
239
|
+
type: 'local',
|
|
240
|
+
fileData: item
|
|
241
|
+
};
|
|
242
|
+
}))));
|
|
243
|
+
}, [localFileData]);
|
|
244
|
+
var onSelectQQDocsFileHandler = (0, _react.useCallback)(function (checkedDocsList) {
|
|
245
|
+
setQQFileData([].concat(_toConsumableArray(qqFileData), _toConsumableArray(checkedDocsList))); // qq 文档只会返回每次新增的文档数组,所以直接在后面追加即可
|
|
246
|
+
|
|
247
|
+
setAllFileData([].concat(_toConsumableArray(allFileData), _toConsumableArray(checkedDocsList.map(function (item) {
|
|
248
|
+
return {
|
|
249
|
+
key: item.id,
|
|
250
|
+
type: 'qq',
|
|
251
|
+
fileData: item
|
|
252
|
+
};
|
|
253
|
+
}))));
|
|
254
|
+
onHideDialogQQDocs();
|
|
255
|
+
}, [qqFileData, allFileData]);
|
|
256
|
+
var onLocalUploadSuccessHandler = (0, _react.useCallback)(function (localFileList) {
|
|
257
|
+
setLocalFileData(localFileList);
|
|
258
|
+
}, []);
|
|
259
|
+
var onClickFileHandler = (0, _react.useCallback)(function (index, options) {
|
|
260
|
+
var currentFile = allFileData[index];
|
|
261
|
+
|
|
262
|
+
if (options === 'delete' || options === 'cancel') {
|
|
263
|
+
if (currentFile.type === 'qq') {
|
|
264
|
+
var removeIndex = qqFileData.findIndex(function (item) {
|
|
265
|
+
return item.id === currentFile.key;
|
|
394
266
|
});
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
267
|
+
qqFileData.splice(removeIndex, 1);
|
|
268
|
+
setQQFileData(_toConsumableArray(qqFileData));
|
|
269
|
+
} else {
|
|
270
|
+
var _removeIndex = localFileData.findIndex(function (item) {
|
|
271
|
+
return item.uid === currentFile.key;
|
|
400
272
|
});
|
|
401
|
-
} else if (options === 'preview') {
|
|
402
|
-
var imgIndex = _this.getImgIndex(index);
|
|
403
273
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
var _reUploadFileInfo = _this.state.uploadSuccessFiles[index];
|
|
407
|
-
var reUploadFile = _this.state.selectFiles[_reUploadFileInfo.FileName];
|
|
408
|
-
|
|
409
|
-
_this.dealSelectFiles([reUploadFile]);
|
|
274
|
+
localFileData.splice(_removeIndex, 1);
|
|
275
|
+
setLocalFileData(_toConsumableArray(localFileData));
|
|
410
276
|
}
|
|
411
|
-
};
|
|
412
277
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
var attachmentPreviewUrl = _this.state.attachmentPreviewUrl;
|
|
420
|
-
if (!list.length) return;
|
|
421
|
-
return /*#__PURE__*/_react["default"].createElement(_Portals["default"], {
|
|
422
|
-
domNode: attachmentPreviewBox,
|
|
423
|
-
className: "uploadFile__preview__list"
|
|
424
|
-
}, /*#__PURE__*/_react["default"].createElement(_imgViewer["default"], {
|
|
425
|
-
data: attachmentPreviewUrl,
|
|
426
|
-
ref: "imgViewerRef",
|
|
427
|
-
showDownload: false
|
|
428
|
-
}), list.map(function (item, index) {
|
|
429
|
-
return /*#__PURE__*/_react["default"].createElement(_uploadedPreview["default"], {
|
|
430
|
-
uploadResultItem: item,
|
|
431
|
-
index: index,
|
|
432
|
-
key: item.uid,
|
|
433
|
-
className: "uploaded__preview",
|
|
434
|
-
onSubmit: function onSubmit(index, options) {
|
|
435
|
-
_this.handlerUploadPreviewOptions(index, options);
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
|
-
}));
|
|
439
|
-
};
|
|
440
|
-
|
|
441
|
-
_this.handleButtonClick = function (e) {
|
|
442
|
-
e.nativeEvent.stopImmediatePropagation();
|
|
443
|
-
|
|
444
|
-
if (_this.refs.fileInput) {
|
|
445
|
-
// @ts-ignore
|
|
446
|
-
_this.refs.fileInput.click();
|
|
278
|
+
allFileData.splice(index, 1);
|
|
279
|
+
setAllFileData(_toConsumableArray(allFileData));
|
|
280
|
+
} else if (options === 'preview') {
|
|
281
|
+
if (currentFile.type === 'qq') {
|
|
282
|
+
var file = qqFileData[index];
|
|
283
|
+
(0, _tools.openUrl)(file.url);
|
|
447
284
|
}
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
_this.state = {
|
|
451
|
-
uploadSuccessFiles: props.attachments || [],
|
|
452
|
-
attachmentPreviewUrl: props.attachments ? (0, _util.getPreviewImgs)(props.attachments) : [],
|
|
453
|
-
selectFiles: {}
|
|
454
|
-
};
|
|
455
|
-
return _this;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
_createClass(Upload, [{
|
|
459
|
-
key: "componentDidMount",
|
|
460
|
-
value: function componentDidMount() {
|
|
461
|
-
var attachments = this.props.attachments;
|
|
462
|
-
this.setState({
|
|
463
|
-
uploadSuccessFiles: attachments || [],
|
|
464
|
-
attachmentPreviewUrl: attachments ? (0, _util.getPreviewImgs)(attachments) : []
|
|
465
|
-
});
|
|
466
285
|
}
|
|
467
|
-
},
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
286
|
+
}, [allFileData, qqFileData, localFileData]);
|
|
287
|
+
|
|
288
|
+
function renderUploadList(list) {
|
|
289
|
+
var attachmentPreviewBox = restProps.attachmentPreviewBox;
|
|
290
|
+
if (!list.length) return '';
|
|
291
|
+
return /*#__PURE__*/_react["default"].createElement(_Portals["default"], {
|
|
292
|
+
domNode: attachmentPreviewBox,
|
|
293
|
+
className: "uploadFile__preview__list"
|
|
294
|
+
}, list.map(function (item, index) {
|
|
295
|
+
return /*#__PURE__*/_react["default"].createElement(_uploadedPreview["default"], {
|
|
296
|
+
uploadResultItem: item.type === 'qq' ? {
|
|
297
|
+
FileName: item.fileData.title,
|
|
298
|
+
FileType: item.fileData.type,
|
|
299
|
+
ClientUrl: item.fileData.url,
|
|
300
|
+
uid: item.fileData.id,
|
|
301
|
+
uploadStatus: 3,
|
|
302
|
+
Deleteable: true,
|
|
303
|
+
SmallImageUrl: item.fileData.url
|
|
304
|
+
} : item.fileData,
|
|
305
|
+
index: index,
|
|
306
|
+
key: item.key,
|
|
307
|
+
className: "uploaded__preview",
|
|
308
|
+
onSubmit: onClickFileHandler
|
|
309
|
+
});
|
|
310
|
+
}));
|
|
311
|
+
}
|
|
481
312
|
|
|
482
|
-
|
|
483
|
-
|
|
313
|
+
var uploadProps = (0, _react.useMemo)(function () {
|
|
314
|
+
return _objectSpread(_objectSpread({}, restProps), {}, {
|
|
315
|
+
filesTotal: undefined,
|
|
316
|
+
// 禁止
|
|
317
|
+
onSubmit: onDefaultSubmit,
|
|
318
|
+
onUploadSuccess: onLocalUploadSuccessHandler
|
|
319
|
+
});
|
|
320
|
+
}, [restProps, onLocalUploadSuccessHandler]);
|
|
321
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_dialogUploadType["default"], {
|
|
322
|
+
uploadProps: uploadProps,
|
|
323
|
+
onSelectQQDocs: onShowDialogQQDocs,
|
|
324
|
+
visible: dialogUploadTypeVidible,
|
|
325
|
+
onClose: onHideDialogUploadType
|
|
326
|
+
}), /*#__PURE__*/_react["default"].createElement(_dialogQqDocs["default"], {
|
|
327
|
+
fileNumLimit: uploadProps.fileNumLimit,
|
|
328
|
+
defaultQQDocsData: defaultQQDocsData,
|
|
329
|
+
visible: dialogQQDocsVidible,
|
|
330
|
+
onClose: onHideDialogQQDocs,
|
|
331
|
+
onSubmit: onSelectQQDocsFileHandler
|
|
332
|
+
}), /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
333
|
+
container: document.body,
|
|
334
|
+
content: /*#__PURE__*/_react["default"].createElement("p", {
|
|
335
|
+
dangerouslySetInnerHTML: {
|
|
336
|
+
__html: attachmentTipText
|
|
484
337
|
}
|
|
485
|
-
}
|
|
486
|
-
}, {
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
var _this2 = this;
|
|
490
|
-
|
|
491
|
-
var _this$props3 = this.props,
|
|
492
|
-
children = _this$props3.children,
|
|
493
|
-
className = _this$props3.className,
|
|
494
|
-
style = _this$props3.style,
|
|
495
|
-
_this$props3$attachme = _this$props3.attachmentTipText,
|
|
496
|
-
attachmentTipText = _this$props3$attachme === void 0 ? (0, _getLocale.getLocale)('OKR_MyO_KRP_Draganddropu') : _this$props3$attachme;
|
|
497
|
-
var uploadSuccessFiles = this.state.uploadSuccessFiles;
|
|
498
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
499
|
-
container: document.body,
|
|
500
|
-
content: /*#__PURE__*/_react["default"].createElement("p", {
|
|
501
|
-
dangerouslySetInnerHTML: {
|
|
502
|
-
__html: attachmentTipText
|
|
503
|
-
}
|
|
504
|
-
})
|
|
505
|
-
}, /*#__PURE__*/_react["default"].createElement(_style.UploadFormContainer, {
|
|
506
|
-
className: className,
|
|
507
|
-
style: style,
|
|
508
|
-
onMouseUp: function onMouseUp(e) {
|
|
509
|
-
return _this2.handleButtonClick(e);
|
|
510
|
-
}
|
|
511
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
512
|
-
ref: "uploader-trigger",
|
|
513
|
-
style: {
|
|
514
|
-
cursor: 'pointer'
|
|
515
|
-
}
|
|
516
|
-
}, children), /*#__PURE__*/_react["default"].createElement("input", {
|
|
517
|
-
type: "file",
|
|
518
|
-
ref: "fileInput",
|
|
519
|
-
className: "upload_file_input",
|
|
520
|
-
multiple: this.props.multiple,
|
|
521
|
-
style: {
|
|
522
|
-
display: 'none'
|
|
523
|
-
},
|
|
524
|
-
onChange: this.onFileInputChange
|
|
525
|
-
}))), this.renderUploadList(uploadSuccessFiles));
|
|
526
|
-
}
|
|
527
|
-
}]);
|
|
528
|
-
|
|
529
|
-
return Upload;
|
|
530
|
-
}(_react.PureComponent);
|
|
531
|
-
|
|
532
|
-
Upload.Preview = _uploadedPreview["default"];
|
|
533
|
-
Upload.defaultProps = {
|
|
534
|
-
fileNumLimit: 20,
|
|
535
|
-
fileSizeLimit: 50,
|
|
536
|
-
filesTotal: 50,
|
|
537
|
-
multiple: true,
|
|
538
|
-
attachmentPreviewBox: 'MBlog__attachmentViewBox'
|
|
338
|
+
})
|
|
339
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
340
|
+
onClick: onShowDialogUploadType
|
|
341
|
+
}, children)), renderUploadList(allFileData));
|
|
539
342
|
};
|
|
540
|
-
|
|
343
|
+
|
|
344
|
+
var _default = UploadMode;
|
|
541
345
|
exports["default"] = _default;
|