bm-admin-ui 1.0.82-alpha → 1.0.83-alpha

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.
Files changed (41) hide show
  1. package/es/components/attachment/index.js +273 -0
  2. package/es/components/breadcrumb/index.js +158 -0
  3. package/es/components/button/index.js +49 -0
  4. package/es/components/edit-form/index.js +1186 -0
  5. package/es/components/editor/index.js +12554 -0
  6. package/es/components/feedback/index.js +295 -0
  7. package/es/components/float-table/index.js +3511 -0
  8. package/es/components/flow-designer/index.js +1317 -0
  9. package/es/components/form-create/index.js +20978 -0
  10. package/es/components/form-designer/index.js +4514 -0
  11. package/es/components/index.js +19 -0
  12. package/es/components/input-tags-display/index.js +226 -0
  13. package/es/components/over-tooltips/index.js +133 -0
  14. package/es/components/search-filter/index.js +441 -0
  15. package/es/components/select-all/index.js +165 -0
  16. package/es/components/shops-filter/index.js +453 -0
  17. package/es/components/staffs-selector/index.js +728 -0
  18. package/es/components/timeline/index.js +168 -0
  19. package/es/components/upload/index.js +909 -0
  20. package/es/components/videoView/index.js +100 -0
  21. package/lib/components/attachment/index.js +278 -0
  22. package/lib/components/breadcrumb/index.js +168 -0
  23. package/lib/components/button/index.js +58 -0
  24. package/lib/components/edit-form/index.js +1195 -0
  25. package/lib/components/editor/index.js +12559 -0
  26. package/lib/components/feedback/index.js +309 -0
  27. package/lib/components/float-table/index.js +3516 -0
  28. package/lib/components/flow-designer/index.js +1329 -0
  29. package/lib/components/form-create/index.js +20990 -0
  30. package/lib/components/form-designer/index.js +4525 -0
  31. package/lib/components/index.js +140 -0
  32. package/lib/components/input-tags-display/index.js +237 -0
  33. package/lib/components/over-tooltips/index.js +138 -0
  34. package/lib/components/search-filter/index.js +451 -0
  35. package/lib/components/select-all/index.js +174 -0
  36. package/lib/components/shops-filter/index.js +465 -0
  37. package/lib/components/staffs-selector/index.js +733 -0
  38. package/lib/components/timeline/index.js +174 -0
  39. package/lib/components/upload/index.js +914 -0
  40. package/lib/components/videoView/index.js +105 -0
  41. package/package.json +1 -1
@@ -0,0 +1,914 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var withInstall = require('bm-admin-ui/lib/utils/with-install');
6
+ var vue = require('vue');
7
+ var iconsVue = require('@ant-design/icons-vue');
8
+
9
+ var _export_sfc = (sfc, props) => {
10
+ const target = sfc.__vccOpts || sfc;
11
+ for (const [key, val] of props) {
12
+ target[key] = val;
13
+ }
14
+ return target;
15
+ };
16
+
17
+ const _sfc_main$1 = {
18
+ name: "BmOverTooltips",
19
+ props: {
20
+ title: {
21
+ type: String,
22
+ default: void 0
23
+ },
24
+ labelTitle: {
25
+ type: String,
26
+ default: void 0
27
+ },
28
+ line: {
29
+ type: Number,
30
+ default: 1
31
+ },
32
+ width: {
33
+ type: [Number, String],
34
+ default: 0
35
+ },
36
+ showAlways: {
37
+ type: Boolean,
38
+ default: false
39
+ }
40
+ },
41
+ setup(props, context) {
42
+ const state = vue.reactive({
43
+ mSlots: {},
44
+ isShow: false,
45
+ openShow: false
46
+ });
47
+ const observer = new IntersectionObserver(
48
+ (entries) => {
49
+ entries.forEach((item) => {
50
+ if (item.intersectionRatio > 0.3) {
51
+ observerDom();
52
+ observer.disconnect();
53
+ }
54
+ });
55
+ },
56
+ {
57
+ threshold: 0.3
58
+ }
59
+ );
60
+ function observerDom() {
61
+ if (props.line === 1) {
62
+ if (mySelf.value.scrollWidth > mySelf.value.clientWidth) {
63
+ state.openShow = true;
64
+ }
65
+ } else if (props.line > 1) {
66
+ if (mySelf.value.scrollHeight > mySelf.value.clientHeight) {
67
+ state.openShow = true;
68
+ }
69
+ }
70
+ }
71
+ vue.onBeforeUnmount(function() {
72
+ observer.disconnect();
73
+ });
74
+ let mySelf = vue.ref();
75
+ vue.watch(
76
+ () => props.showAlways,
77
+ function(showAlways) {
78
+ if (showAlways)
79
+ state.openShow = showAlways;
80
+ mySelf.value && observer.unobserve(mySelf.value);
81
+ vue.nextTick(function() {
82
+ mySelf.value && observer.observe(mySelf.value);
83
+ });
84
+ },
85
+ {
86
+ immediate: true
87
+ }
88
+ );
89
+ const handleVisibleChange = (val) => {
90
+ state.isShow = !state.openShow ? false : val;
91
+ };
92
+ const getPopupContainer = () => {
93
+ return document.body;
94
+ };
95
+ return {
96
+ ...vue.toRefs(state),
97
+ mySelf,
98
+ handleVisibleChange,
99
+ getPopupContainer
100
+ };
101
+ }
102
+ };
103
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
104
+ const _component_a_tooltip = vue.resolveComponent("a-tooltip");
105
+ return vue.openBlock(), vue.createBlock(_component_a_tooltip, {
106
+ visible: _ctx.isShow,
107
+ "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => _ctx.isShow = $event),
108
+ title: $props.labelTitle || $props.title,
109
+ "get-popup-container": $setup.getPopupContainer,
110
+ onVisibleChange: $setup.handleVisibleChange
111
+ }, {
112
+ title: vue.withCtx(() => [
113
+ vue.renderSlot(_ctx.$slots, "title")
114
+ ]),
115
+ default: vue.withCtx(() => [
116
+ vue.createElementVNode("div", {
117
+ ref: "mySelf",
118
+ style: vue.normalizeStyle({
119
+ width: $props.width ? $props.width + "px" : "100%",
120
+ WebkitLineClamp: $props.line
121
+ }),
122
+ class: vue.normalizeClass($props.line === 1 ? `bm-over-tooltip` : `bm-over-tooltip-multi`)
123
+ }, [
124
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
125
+ vue.renderSlot(_ctx.$slots, "title", {}, () => [
126
+ vue.createTextVNode(vue.toDisplayString($props.title), 1)
127
+ ])
128
+ ])
129
+ ], 6)
130
+ ]),
131
+ _: 3
132
+ }, 8, ["visible", "title", "get-popup-container", "onVisibleChange"]);
133
+ }
134
+ var OverTooltips$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "over-tooltips.vue"]]);
135
+
136
+ const BmOverTooltips = withInstall.withInstall(OverTooltips$1);
137
+ var OverTooltips = BmOverTooltips;
138
+
139
+ function getuid() {
140
+ const s = [];
141
+ const hexDigits = '0123456789abcdef';
142
+ for (let i = 0; i < 36; i++) {
143
+ s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
144
+ }
145
+ s[14] = '4';
146
+ s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
147
+ s[8] = s[13] = s[18] = s[23] = '-';
148
+ const uuid = s.join('');
149
+ return uuid;
150
+ }
151
+ function wait(ms) {
152
+ return new Promise((resolve) => setTimeout(resolve, ms));
153
+ }
154
+ var utils = {
155
+ getuid,
156
+ wait,
157
+ };
158
+
159
+ const pdf = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAABmdJREFUeAHtWgtsU1UY/u6j62vdGxA35CEo8cE0qCOIMiIYBREBMU6CIKBRkZcYojwCQQRfU8FgAiohERxGMBE1kWjMEgWBgIiAIs8NBmOwdWNrt7b33l7POWWXlQ3Xdt1pO3aS23ve//995/zn8d8KIKFqXF6OV214V4CQr+t6d5qXKME+/rmi1Clzn4lUX5GBVxoOQEdBooGnoOVuOQWXNnz4ZcQE0JEnjTMi7SAe2rWFBJFO+3gA0VYdIiVBTMRpfy2yIiFBvFZniZofLgkdjgA6cOGQ0CEJCIeEDktAqCR0aAJCIaHDE9AaCdcFAf9HQsIT4K93UXwhhZZ2h4QnQD1bEhL4xkpXk5DwBHh2/gzd62nEF9K7KQnCudED9JBaxXElwe6AZfBwyNm9INqSQ9ZUrSgr4k6AmJKO1LnLkXTLndD9GhqKf4Br4xoyig0hKx7NinI0Owulr7R5K2C+e7BRNXnMJEhpWagpfN3I4xnhugZI3bIN8HWb18J35ADDaup3G0/MQbK4EiD3vtUQ7v72C2jOCyyte2Iz/alwrgQI8hWL0911ZMFyMAL89W72jsUPVwKuBij37MuytHOlVxdxS3MlQFd8BjCp642Q0rNYWik9ZuTzjnAlQD111MBnHTrSiKulx4047whXArQL56BdcjKMlv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BC7CRELyA/yRQCDgmwXsBdb02fFbrr38H7wUsl5UV/GHTbwneC5jP39Vm83Xgs/pECdF4/LizeqvFm7rdjur3r1WvlyqTbVdVfZZntpvbvM/8Dsxmry5HzLy/Ai7U+I4IQBuMWRrAOHVklgagDcYsDWCcOjJLA9AGY5YGME4dmaUBaIMxSwMYp47M0gC0wZilAYxTR2ZpANpgzNIAxqkjszQAbTBmaQDj1JFZGoA2GLM0gHHqyCwNQBuMWRrAOHVklgagDcYsDWCcOjJLA9AGY9YNiBaM4HvmaGGuwJRXgJrGSdLJtYAVoYSVYY+L4uEjSbo3+iqUHNfBXPmoNMyG/RuvFms2+co7XAAAAABJRU5ErkJggg==`;
164
+ var icons = {
165
+ pdf,
166
+ ppt,
167
+ excel,
168
+ doc,
169
+ others,
170
+ };
171
+
172
+ const CLOUND_PRE = "/cloudStorage/read";
173
+ const _sfc_main = {
174
+ name: "BmUpload",
175
+ components: {
176
+ PlusOutlined: iconsVue.PlusOutlined,
177
+ OverTooltips,
178
+ UploadOutlined: iconsVue.UploadOutlined,
179
+ LoadingOutlined: iconsVue.LoadingOutlined,
180
+ InboxOutlined: iconsVue.InboxOutlined
181
+ },
182
+ props: {
183
+ uploadProps: {
184
+ type: Object,
185
+ default: () => {
186
+ return {};
187
+ }
188
+ },
189
+ extraProps: {
190
+ type: Object,
191
+ default: () => {
192
+ return {};
193
+ }
194
+ },
195
+ defaultList: {
196
+ type: Array,
197
+ default: () => []
198
+ },
199
+ uploadRequest: {
200
+ type: Function,
201
+ default() {
202
+ return () => {
203
+ };
204
+ }
205
+ },
206
+ cloudReadUrl: {
207
+ type: String,
208
+ default: ""
209
+ },
210
+ holdProgress: {
211
+ type: Number,
212
+ default: 0
213
+ },
214
+ customErrors: {
215
+ type: Object,
216
+ default() {
217
+ return void 0;
218
+ }
219
+ }
220
+ },
221
+ emits: [
222
+ "success",
223
+ "delete",
224
+ "update",
225
+ "previewFile",
226
+ "successFile",
227
+ "deleteFile",
228
+ "error",
229
+ "updateDisabledStatus",
230
+ "updateIsUploadingStatus"
231
+ ],
232
+ setup(props, { emit, expose }) {
233
+ let acceptList = [
234
+ ".xlsx",
235
+ ".XLSX",
236
+ ".pdf",
237
+ ".PDF",
238
+ ".doc",
239
+ ".DOC",
240
+ ".docx",
241
+ ".DOCX",
242
+ ".jpg",
243
+ ".JPG",
244
+ ".jpeg",
245
+ ".JPEG",
246
+ ".png",
247
+ ".PNG",
248
+ ".gif",
249
+ ".GIF",
250
+ ".rar",
251
+ ".RAR",
252
+ ".zip",
253
+ ".ZIP",
254
+ ".ppt",
255
+ ".PPT",
256
+ ".pptx",
257
+ ".PPTX",
258
+ ".mp4",
259
+ ".MP4"
260
+ ];
261
+ const state = vue.reactive({
262
+ uploadBarColor: "#4DA0FF",
263
+ uploadedList: [],
264
+ fileList: {},
265
+ onepViewImageHover: {},
266
+ previewVisible: false,
267
+ onepViewImage: {},
268
+ extraConfigs: {
269
+ maxSize: 5,
270
+ maxCount: 5,
271
+ isAllowDownloadFieldProps: false,
272
+ hideDisabledBtn: true,
273
+ tips: "",
274
+ showTips: true,
275
+ btnClass: "",
276
+ picClass: "",
277
+ alignCenter: false,
278
+ canNotViewAccept: ".rar,.zip",
279
+ myBtn: false,
280
+ showFileName: false,
281
+ drag: false
282
+ },
283
+ uploadConfigs: {
284
+ multiple: false,
285
+ showUploadList: false,
286
+ showSlotList: false,
287
+ listType: "text",
288
+ text: "",
289
+ accept: acceptList.join(","),
290
+ data: {},
291
+ name: "file",
292
+ disabled: false,
293
+ async customRequest({ file, fileField, data }) {
294
+ if (file.size > state.extraConfigs.maxSize * 1024 * 1024) {
295
+ return methods.uploadError(
296
+ new Error(
297
+ props.customErrors?.maxSize || `\u4E0D\u80FD\u4E0A\u4F20\u5927\u4E8E${state.extraConfigs.maxSize}M\u7684\u6587\u4EF6`
298
+ )
299
+ );
300
+ }
301
+ if (Object.keys(state.fileList).length >= state.extraConfigs.maxCount) {
302
+ return methods.uploadError(
303
+ new Error(
304
+ props.customErrors?.maxCount || `\u4E0D\u80FD\u4E0A\u4F20\u591A\u4E8E${state.extraConfigs.maxCount}\u4E2A\u6587\u4EF6`
305
+ )
306
+ );
307
+ }
308
+ let name = file.name;
309
+ let fileFormat = name.split(".").pop();
310
+ if (!state.uploadConfigs.accept.includes(`.${fileFormat}`)) {
311
+ return methods.uploadError(
312
+ new Error(props.customErrors?.format || `\u4E0D\u80FD\u4E0A\u4F20\u8BE5\u7C7B\u578B\u6587\u4EF6`)
313
+ );
314
+ }
315
+ state.fileList[file.uid] = {
316
+ uid: file.uid,
317
+ name: file.name,
318
+ type: fileFormat,
319
+ progress: 0,
320
+ file,
321
+ isDoneDeloy: false,
322
+ status: ""
323
+ };
324
+ setTimeout(function() {
325
+ if (methods.fileIsDelete(file)) {
326
+ return;
327
+ }
328
+ state.fileList[file.uid].isDoneDeloy = true;
329
+ }, 1e3);
330
+ methods.customUploadRequest(file);
331
+ }
332
+ },
333
+ pictureFileTypes: [
334
+ "img",
335
+ "image",
336
+ "png",
337
+ "PNG",
338
+ "image/png",
339
+ "jpg",
340
+ "JPG",
341
+ "jpeg",
342
+ "JPEG",
343
+ "image/jpeg",
344
+ "gif",
345
+ "GIF",
346
+ "image/gif"
347
+ ]
348
+ });
349
+ const methods = {
350
+ updateUploadProgress(file, progress) {
351
+ if (methods.fileIsDelete(file)) {
352
+ return;
353
+ }
354
+ state.fileList[file.uid] = {
355
+ ...state.fileList[file.uid],
356
+ progress
357
+ };
358
+ },
359
+ customUploadRequest(file) {
360
+ props.uploadRequest?.(file, {
361
+ onUploadProgress: (e) => {
362
+ let progress = Math.round(e.loaded / e.total * 100);
363
+ if (props.holdProgress) {
364
+ progress = progress > props.holdProgress ? props.holdProgress : progress;
365
+ }
366
+ methods.updateUploadProgress(file, progress);
367
+ }
368
+ }).then(function(data) {
369
+ methods.updateUploadProgress(file, 100);
370
+ methods.uploadSuccess(data, file);
371
+ }).catch(function(error) {
372
+ console.error(error);
373
+ if (state.uploadConfigs.listType === "text") {
374
+ state.fileList[file.uid].progress = 100;
375
+ }
376
+ methods.uploadError(error, file);
377
+ });
378
+ },
379
+ fileIsDelete(file) {
380
+ return !state.fileList[file.uid];
381
+ },
382
+ uploadSuccess(data, file) {
383
+ if (methods.fileIsDelete(file)) {
384
+ return;
385
+ }
386
+ state.fileList[file.uid].status = "success";
387
+ let uri = data?.url;
388
+ let item = {
389
+ name: file.name,
390
+ size: file.size,
391
+ type: file.type,
392
+ uid: file.uid,
393
+ url: uri
394
+ };
395
+ state.uploadedList.push(item);
396
+ state.fileList[file.uid].url = uri;
397
+ emit("successFile", data);
398
+ emit("success", state.uploadedList);
399
+ emit("update", state.uploadedList);
400
+ },
401
+ uploadError(error, file) {
402
+ if (file) {
403
+ if (methods.fileIsDelete(file)) {
404
+ return;
405
+ }
406
+ state.fileList[file.uid].status = "error";
407
+ }
408
+ emit("error", error);
409
+ },
410
+ async deleteFile(uid) {
411
+ let targetFile = state.fileList[uid];
412
+ delete state.fileList[uid];
413
+ const index = state.uploadedList.findIndex(
414
+ (ele) => ele.url === targetFile.url
415
+ );
416
+ if (index !== -1) {
417
+ state.uploadedList.splice(index, 1);
418
+ }
419
+ emit("deleteFile", targetFile);
420
+ emit("delete", state.uploadedList);
421
+ emit("update", state.uploadedList);
422
+ },
423
+ pictureHoverEnter(uid) {
424
+ state.onepViewImageHover[uid] = true;
425
+ },
426
+ pictureHoverLeave(uid) {
427
+ state.onepViewImageHover[uid] = false;
428
+ },
429
+ viewOnePicture(item) {
430
+ if (state.pictureFileTypes.includes(item.type.toLowerCase())) {
431
+ state.previewVisible = true;
432
+ state.onepViewImage = item;
433
+ }
434
+ emit("previewFile", item);
435
+ },
436
+ handleClosePictureView() {
437
+ state.previewVisible = false;
438
+ },
439
+ reUpload(e, uid) {
440
+ e.stopPropagation();
441
+ let file = state.fileList[uid].file;
442
+ state.onepViewImageHover[uid] = false;
443
+ delete state.fileList[uid];
444
+ state.uploadConfigs.customRequest({
445
+ file,
446
+ fileField: state.uploadConfigs.name,
447
+ data: state.uploadConfigs.data
448
+ });
449
+ },
450
+ paste(event) {
451
+ if (uploadDisabled.value) {
452
+ return;
453
+ }
454
+ const items = event?.clipboardData?.items;
455
+ let file = null;
456
+ if (items && items.length) {
457
+ for (var i = 0; i < items.length; i++) {
458
+ if (items[i].type.match("^image/")) {
459
+ file = items[i].getAsFile();
460
+ break;
461
+ }
462
+ }
463
+ }
464
+ if (file) {
465
+ let uid = utils.getuid();
466
+ let filename = file.name;
467
+ let fileInfo = filename?.split(".");
468
+ if (fileInfo && fileInfo.length > 1) {
469
+ fileInfo[fileInfo.length - 2] = uid;
470
+ filename = fileInfo.join(".");
471
+ } else {
472
+ filename = uid + ".png";
473
+ }
474
+ file = new File([file], filename, { type: file.type });
475
+ file["uid"] = uid;
476
+ state.uploadConfigs.customRequest({
477
+ file,
478
+ fileField: state.uploadConfigs.name,
479
+ data: state.uploadConfigs.data
480
+ });
481
+ }
482
+ },
483
+ handleReject(e) {
484
+ return methods.uploadError(
485
+ new Error(props.customErrors?.format || `\u4E0D\u80FD\u4E0A\u4F20\u8BE5\u7C7B\u578B\u6587\u4EF6`)
486
+ );
487
+ }
488
+ };
489
+ vue.watch(
490
+ () => props.defaultList,
491
+ function(list) {
492
+ if (list?.length) {
493
+ list.forEach((item) => {
494
+ if (!item.uid) {
495
+ item.uid = utils.getuid();
496
+ }
497
+ });
498
+ list.forEach(function(item) {
499
+ let uid = item.uid || utils.getuid();
500
+ if (!item.url.includes("http") && !item.url.includes(CLOUND_PRE))
501
+ item.url = props.cloudReadUrl + item.url;
502
+ state.fileList[uid] = {
503
+ uid,
504
+ name: item.name,
505
+ url: item.url,
506
+ type: item.type || "png",
507
+ progress: 100,
508
+ isDoneDeloy: true
509
+ };
510
+ if (!state.uploadedList.find((item2) => item2.uid === uid)) {
511
+ state.uploadedList.push(item);
512
+ }
513
+ });
514
+ } else {
515
+ state.fileList = {};
516
+ state.uploadedList = [];
517
+ }
518
+ },
519
+ {
520
+ immediate: true
521
+ }
522
+ );
523
+ vue.watch(
524
+ [() => props.uploadProps, () => props.extraProps],
525
+ function([config, extra]) {
526
+ state.uploadConfigs = {
527
+ ...state.uploadConfigs,
528
+ ...config,
529
+ showUploadList: false
530
+ };
531
+ state.extraConfigs = {
532
+ ...state.extraConfigs,
533
+ ...extra
534
+ };
535
+ },
536
+ {
537
+ immediate: true,
538
+ deep: true
539
+ }
540
+ );
541
+ const uploadDisabled = vue.computed(() => {
542
+ if (props.uploadProps.disabled || Object.keys(state.fileList).length >= state.extraConfigs.maxCount) {
543
+ return true;
544
+ }
545
+ return false;
546
+ });
547
+ vue.watch(
548
+ () => uploadDisabled.value,
549
+ (value) => {
550
+ emit("updateDisabledStatus", value);
551
+ },
552
+ {
553
+ immediate: true
554
+ }
555
+ );
556
+ const isUploading = vue.computed(() => {
557
+ let ret = false;
558
+ let fileList = state.fileList || {};
559
+ Object.keys(fileList).forEach((uid) => {
560
+ if (fileList[uid]?.progress && fileList[uid].progress < 100) {
561
+ ret = true;
562
+ }
563
+ });
564
+ return ret;
565
+ });
566
+ vue.watch(
567
+ () => isUploading.value,
568
+ (value) => {
569
+ emit("updateIsUploadingStatus", value);
570
+ },
571
+ {
572
+ immediate: true
573
+ }
574
+ );
575
+ expose({ state, methods, paste: methods.paste });
576
+ return {
577
+ ...vue.toRefs(state),
578
+ icons,
579
+ ...methods,
580
+ uploadDisabled
581
+ };
582
+ }
583
+ };
584
+ const _hoisted_1 = {
585
+ key: 0,
586
+ class: "bm-upload__picture-progress"
587
+ };
588
+ const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__picture-progress__text" }, "\u56FE\u7247\u4E0A\u4F20\u4E2D", -1);
589
+ const _hoisted_3 = ["onMouseenter", "onMouseleave"];
590
+ const _hoisted_4 = ["src"];
591
+ const _hoisted_5 = ["src"];
592
+ const _hoisted_6 = ["src"];
593
+ const _hoisted_7 = ["src"];
594
+ const _hoisted_8 = ["src"];
595
+ const _hoisted_9 = ["onClick"];
596
+ const _hoisted_10 = ["onClick"];
597
+ const _hoisted_11 = ["onMouseenter", "onMouseleave"];
598
+ const _hoisted_12 = /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__picture-error__image" }, null, -1);
599
+ const _hoisted_13 = /* @__PURE__ */ vue.createElementVNode("div", null, "\u4E0A\u4F20\u9519\u8BEF", -1);
600
+ const _hoisted_14 = {
601
+ key: 0,
602
+ class: "bm-upload__picture-result__cover"
603
+ };
604
+ const _hoisted_15 = ["onClick"];
605
+ const _hoisted_16 = ["onClick"];
606
+ const _hoisted_17 = {
607
+ key: 0,
608
+ class: "bm-upload__picture__name"
609
+ };
610
+ const _hoisted_18 = {
611
+ key: 1,
612
+ class: "bm-upload__button__wrapper"
613
+ };
614
+ const _hoisted_19 = { key: 0 };
615
+ const _hoisted_20 = { class: "ant-upload-text bm-upload__text" };
616
+ const _hoisted_21 = {
617
+ key: 0,
618
+ class: "bm-upload__tips"
619
+ };
620
+ const _hoisted_22 = {
621
+ key: 1,
622
+ style: { "font-size": "24px", "color": "#9393a3" }
623
+ };
624
+ const _hoisted_23 = { class: "ant-upload-text bm-upload__text" };
625
+ const _hoisted_24 = {
626
+ key: 0,
627
+ class: "bm-upload__tips"
628
+ };
629
+ const _hoisted_25 = { key: 2 };
630
+ const _hoisted_26 = {
631
+ key: 0,
632
+ class: "bm-upload__tips"
633
+ };
634
+ const _hoisted_27 = {
635
+ key: 2,
636
+ class: "bm-upload__file-list"
637
+ };
638
+ const _hoisted_28 = { class: "bm-upload__file__detail" };
639
+ const _hoisted_29 = /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__file__icon" }, [
640
+ /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__attachment" })
641
+ ], -1);
642
+ const _hoisted_30 = { class: "bm-upload__file__name" };
643
+ const _hoisted_31 = { class: "bm-upload__file__progress-tools" };
644
+ const _hoisted_32 = ["onClick"];
645
+ const _hoisted_33 = ["onClick"];
646
+ const _hoisted_34 = {
647
+ key: 0,
648
+ class: "bm-upload__progress"
649
+ };
650
+ const _hoisted_35 = { style: { "padding-top": "20px" } };
651
+ const _hoisted_36 = ["src"];
652
+ const _hoisted_37 = ["title", "src"];
653
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
654
+ const _component_a_progress = vue.resolveComponent("a-progress");
655
+ const _component_a_image = vue.resolveComponent("a-image");
656
+ const _component_LoadingOutlined = vue.resolveComponent("LoadingOutlined");
657
+ const _component_OverTooltips = vue.resolveComponent("OverTooltips");
658
+ const _component_InboxOutlined = vue.resolveComponent("InboxOutlined");
659
+ const _component_PlusOutlined = vue.resolveComponent("PlusOutlined");
660
+ const _component_UploadOutlined = vue.resolveComponent("UploadOutlined");
661
+ const _component_a_button = vue.resolveComponent("a-button");
662
+ const _component_a_modal = vue.resolveComponent("a-modal");
663
+ return vue.openBlock(), vue.createElementBlock("div", {
664
+ class: vue.normalizeClass(["bm-upload", {
665
+ "bm-upload--text": _ctx.uploadConfigs.listType === "text",
666
+ "bm-upload--drag": _ctx.extraConfigs.drag,
667
+ "bm-upload--picture-card": _ctx.uploadConfigs.listType === "picture-card",
668
+ "bm-upload--picture-card--has-tips": !($setup.uploadDisabled && _ctx.extraConfigs?.hideDisabledBtn) && !_ctx.extraConfigs.myBtn && _ctx.uploadConfigs.listType === "picture-card" && _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips
669
+ }])
670
+ }, [
671
+ _ctx.uploadConfigs.listType === "picture-card" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
672
+ vue.createCommentVNode(" \u4E0D\u8981\u4F7F\u7528 a-image-preview-group \u5305\u88F9\uFF0C\u4E0D\u7136\u4F1A\u51FA\u73B0\u91CD\u590D\u56FE\u7247\u548C\u7A7A\u767D\u56FE\u7247 "),
673
+ vue.createCommentVNode(" <a-image-preview-group> "),
674
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.fileList, (item) => {
675
+ return vue.openBlock(), vue.createElementBlock("div", {
676
+ key: item,
677
+ class: "bm-upload__picture_wrapper"
678
+ }, [
679
+ vue.createElementVNode("div", {
680
+ class: vue.normalizeClass(["bm-upload__picture", { "bm-upload__picture--error": item.status === "error" }])
681
+ }, [
682
+ vue.createCommentVNode(" \u4E0A\u4F20\u4E2D "),
683
+ item.progress < 100 && item.status !== "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
684
+ _hoisted_2,
685
+ vue.createVNode(_component_a_progress, {
686
+ type: "line",
687
+ "stroke-width": 2,
688
+ "show-info": false,
689
+ "stroke-color": _ctx.uploadBarColor,
690
+ percent: item.uid?.progress
691
+ }, null, 8, ["stroke-color", "percent"])
692
+ ])) : vue.createCommentVNode("v-if", true),
693
+ vue.createCommentVNode(" \u56FE\u7247\u5C55\u793A "),
694
+ item.progress >= 100 && item.status !== "error" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
695
+ !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock("div", {
696
+ key: 0,
697
+ class: "bm-upload__picture-result",
698
+ onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
699
+ onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
700
+ onClick: _cache[0] || (_cache[0] = (e) => e.stopPropagation())
701
+ }, [
702
+ ["pdf", "PDF", "application/pdf"].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
703
+ key: 0,
704
+ class: "bm-upload__picture-result__image",
705
+ src: $setup.icons.pdf,
706
+ alt: "\u56FE\u7247"
707
+ }, null, 8, _hoisted_4)) : [
708
+ "xlsx",
709
+ "XLSX",
710
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
711
+ ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
712
+ key: 1,
713
+ class: "bm-upload__picture-result__image",
714
+ src: $setup.icons.excel,
715
+ alt: "\u56FE\u7247"
716
+ }, null, 8, _hoisted_5)) : [
717
+ "ppt",
718
+ "PPT",
719
+ "application/vnd.ms-powerpoint",
720
+ "pptx",
721
+ "PPTX",
722
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation"
723
+ ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
724
+ key: 2,
725
+ class: "bm-upload__picture-result__image",
726
+ src: $setup.icons.ppt,
727
+ alt: "\u56FE\u7247"
728
+ }, null, 8, _hoisted_6)) : [
729
+ "doc",
730
+ "DOC",
731
+ "application/msword",
732
+ "docx",
733
+ "DOCX",
734
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
735
+ ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
736
+ key: 3,
737
+ class: "bm-upload__picture-result__image",
738
+ src: $setup.icons.doc,
739
+ alt: "\u56FE\u7247"
740
+ }, null, 8, _hoisted_7)) : _ctx.pictureFileTypes.includes(item.type) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 4 }, [
741
+ item.url ? (vue.openBlock(), vue.createBlock(_component_a_image, {
742
+ key: 0,
743
+ class: "bm-upload__picture-result__image",
744
+ src: item.url,
745
+ alt: "\u56FE\u7247"
746
+ }, null, 8, ["src"])) : (vue.openBlock(), vue.createBlock(_component_LoadingOutlined, { key: 1 }))
747
+ ], 64)) : (vue.openBlock(), vue.createElementBlock("img", {
748
+ key: 5,
749
+ class: "bm-upload__picture-result__image",
750
+ src: $setup.icons.others,
751
+ alt: "\u56FE\u7247"
752
+ }, null, 8, _hoisted_8)),
753
+ _ctx.onepViewImageHover[item.uid] ? (vue.openBlock(), vue.createElementBlock("div", {
754
+ key: 6,
755
+ class: vue.normalizeClass(["bm-upload__picture-result__cover", {
756
+ isPicture: _ctx.pictureFileTypes.includes(item.type)
757
+ }])
758
+ }, [
759
+ !_ctx.extraConfigs.canNotViewAccept?.includes(item?.type) ? (vue.openBlock(), vue.createElementBlock("div", {
760
+ key: 0,
761
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--view",
762
+ onClick: ($event) => _ctx.viewOnePicture(item)
763
+ }, null, 8, _hoisted_9)) : vue.createCommentVNode("v-if", true),
764
+ !(_ctx.extraConfigs.hidenDelBtn ?? _ctx.extraConfigs.hideDelBtn ?? false) ? (vue.openBlock(), vue.createElementBlock("div", {
765
+ key: 1,
766
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--delete",
767
+ onClick: ($event) => _ctx.deleteFile(item.uid)
768
+ }, null, 8, _hoisted_10)) : vue.createCommentVNode("v-if", true)
769
+ ], 2)) : vue.createCommentVNode("v-if", true)
770
+ ], 40, _hoisted_3)) : vue.renderSlot(_ctx.$slots, "file", {
771
+ key: 1,
772
+ file: item
773
+ })
774
+ ], 64)) : vue.createCommentVNode("v-if", true),
775
+ vue.createCommentVNode(" \u56FE\u7247\u9519\u8BEF\u5C55\u793A "),
776
+ item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", {
777
+ key: 2,
778
+ class: "bm-upload__picture-error",
779
+ onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
780
+ onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
781
+ onClick: _cache[1] || (_cache[1] = (e) => e.stopPropagation())
782
+ }, [
783
+ _hoisted_12,
784
+ _hoisted_13,
785
+ _ctx.onepViewImageHover[item.uid] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
786
+ vue.createElementVNode("div", {
787
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--retry",
788
+ onClick: (e) => _ctx.reUpload(e, item.uid)
789
+ }, null, 8, _hoisted_15),
790
+ vue.createElementVNode("div", {
791
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--delete",
792
+ onClick: ($event) => _ctx.deleteFile(item.uid)
793
+ }, null, 8, _hoisted_16)
794
+ ])) : vue.createCommentVNode("v-if", true)
795
+ ], 40, _hoisted_11)) : vue.createCommentVNode("v-if", true)
796
+ ], 2),
797
+ vue.createCommentVNode(" \u6587\u4EF6\u540D "),
798
+ _ctx.extraConfigs.showFileName && item.name ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17, [
799
+ vue.createVNode(_component_OverTooltips, {
800
+ title: item.name
801
+ }, null, 8, ["title"])
802
+ ])) : vue.createCommentVNode("v-if", true)
803
+ ]);
804
+ }), 128)),
805
+ vue.createCommentVNode(" </a-image-preview-group> ")
806
+ ], 64)) : vue.createCommentVNode("v-if", true),
807
+ !($setup.uploadDisabled && _ctx.extraConfigs?.hideDisabledBtn) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_18, [
808
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.extraConfigs.drag ? "a-upload-dragger" : "a-upload"), vue.mergeProps(_ctx.uploadConfigs, {
809
+ disabled: $setup.uploadDisabled,
810
+ class: { "bm--upload__custom-button": _ctx.extraConfigs.myBtn },
811
+ onReject: _ctx.handleReject
812
+ }), {
813
+ default: vue.withCtx(() => [
814
+ _ctx.extraConfigs.myBtn ? vue.renderSlot(_ctx.$slots, "myBtn", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
815
+ _ctx.extraConfigs.drag ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
816
+ vue.createVNode(_component_InboxOutlined, { class: "bm-upload__drag-icon" }),
817
+ vue.createElementVNode("div", _hoisted_20, vue.toDisplayString(_ctx.uploadConfigs.text || "\u70B9\u51FB\u4E0A\u4F20/\u62D6\u62FD\u4E0A\u4F20"), 1),
818
+ _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_21, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
819
+ ])) : _ctx.uploadConfigs.listType === "picture-card" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22, [
820
+ vue.createVNode(_component_PlusOutlined),
821
+ vue.createElementVNode("div", _hoisted_23, vue.toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u56FE\u7247"), 1),
822
+ _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_24, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
823
+ ])) : _ctx.uploadConfigs.listType === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_25, [
824
+ vue.createVNode(_component_a_button, {
825
+ class: vue.normalizeClass(_ctx.extraConfigs.btnClass),
826
+ disabled: $setup.uploadDisabled
827
+ }, {
828
+ default: vue.withCtx(() => [
829
+ vue.createVNode(_component_UploadOutlined),
830
+ vue.createTextVNode(" " + vue.toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u6587\u4EF6"), 1)
831
+ ]),
832
+ _: 1
833
+ }, 8, ["class", "disabled"]),
834
+ _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_26, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
835
+ ])) : vue.createCommentVNode("v-if", true)
836
+ ], 64))
837
+ ]),
838
+ _: 3
839
+ }, 16, ["disabled", "class", "onReject"]))
840
+ ])) : vue.createCommentVNode("v-if", true),
841
+ _ctx.uploadConfigs.listType === "text" && !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_27, [
842
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.fileList, (item) => {
843
+ return vue.openBlock(), vue.createElementBlock("div", {
844
+ key: item,
845
+ class: "bm-upload__file"
846
+ }, [
847
+ !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
848
+ vue.createElementVNode("div", _hoisted_28, [
849
+ _hoisted_29,
850
+ vue.createElementVNode("div", _hoisted_30, [
851
+ vue.createVNode(_component_OverTooltips, {
852
+ title: item.name
853
+ }, null, 8, ["title"])
854
+ ]),
855
+ vue.createElementVNode("div", _hoisted_31, [
856
+ item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", {
857
+ key: 0,
858
+ class: "bm-upload__error-reload",
859
+ onClick: (e) => _ctx.reUpload(e, item.uid)
860
+ }, null, 8, _hoisted_32)) : vue.createCommentVNode("v-if", true),
861
+ !(_ctx.extraConfigs.hidenDelBtn ?? _ctx.extraConfigs.hideDelBtn ?? false) ? (vue.openBlock(), vue.createElementBlock("div", {
862
+ key: 1,
863
+ class: "bm-upload__trash",
864
+ onClick: ($event) => _ctx.deleteFile(item.uid)
865
+ }, null, 8, _hoisted_33)) : vue.createCommentVNode("v-if", true)
866
+ ])
867
+ ]),
868
+ !item.isDoneDeloy || item.progress < 100 || item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_34, [
869
+ vue.createVNode(_component_a_progress, {
870
+ type: "line",
871
+ "stroke-width": 2,
872
+ "show-info": false,
873
+ "stroke-color": item.status !== "error" ? _ctx.uploadBarColor : "#E64C2E",
874
+ percent: item.progress
875
+ }, null, 8, ["stroke-color", "percent"])
876
+ ])) : vue.createCommentVNode("v-if", true)
877
+ ], 64)) : vue.renderSlot(_ctx.$slots, "file", {
878
+ key: 1,
879
+ file: item
880
+ })
881
+ ]);
882
+ }), 128))
883
+ ])) : vue.createCommentVNode("v-if", true),
884
+ vue.createVNode(_component_a_modal, {
885
+ visible: _ctx.previewVisible,
886
+ width: _ctx.onepViewImage.type === "pdf" ? "1200px" : "600px",
887
+ footer: null,
888
+ onCancel: _ctx.handleClosePictureView
889
+ }, {
890
+ default: vue.withCtx(() => [
891
+ vue.createElementVNode("div", _hoisted_35, [
892
+ _ctx.pictureFileTypes.includes(_ctx.onepViewImage.type) ? (vue.openBlock(), vue.createElementBlock("img", {
893
+ key: 0,
894
+ style: { "width": "100%" },
895
+ src: _ctx.onepViewImage.url,
896
+ alt: ""
897
+ }, null, 8, _hoisted_36)) : (vue.openBlock(), vue.createElementBlock("iframe", {
898
+ key: 1,
899
+ title: _ctx.onepViewImage.type,
900
+ style: { "width": "100%", "min-height": "600px" },
901
+ src: _ctx.onepViewImage.url
902
+ }, null, 8, _hoisted_37))
903
+ ])
904
+ ]),
905
+ _: 1
906
+ }, 8, ["visible", "width", "onCancel"])
907
+ ], 2);
908
+ }
909
+ var Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "upload.vue"]]);
910
+
911
+ const BmUpload = withInstall.withInstall(Upload);
912
+
913
+ exports.BmUpload = BmUpload;
914
+ exports["default"] = BmUpload;