bm-admin-ui 1.0.0-alpha → 1.0.1-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 (126) hide show
  1. package/es/components/button/index.d.ts +9 -9
  2. package/es/components/button/index.js +1 -1
  3. package/es/components/button/src/button.vue.d.ts +9 -9
  4. package/es/components/float-table/index.d.ts +5 -0
  5. package/es/components/float-table/index.js +448 -0
  6. package/es/components/float-table/src/float-table.vue.d.ts +500 -0
  7. package/es/components/flow-designer/index.js +1 -1
  8. package/es/components/form-designer/index.js +1 -1
  9. package/es/components/index.d.ts +7 -0
  10. package/es/components/index.js +7 -0
  11. package/es/components/multi-cascader-compose/index.d.ts +135 -0
  12. package/es/components/multi-cascader-compose/index.js +1699 -0
  13. package/es/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +135 -0
  14. package/es/components/multi-cascader-compose/src/props.d.ts +32 -0
  15. package/es/components/multi-cascader-compose/types.d.ts +10 -0
  16. package/es/components/over-tooltips/index.d.ts +35 -0
  17. package/es/components/over-tooltips/index.js +117 -0
  18. package/es/components/over-tooltips/src/over-tooltips.vue.d.ts +34 -0
  19. package/es/components/search-filter/index.d.ts +1 -1
  20. package/es/components/search-filter/index.js +593 -29
  21. package/es/components/search-filter/src/search-filter.vue.d.ts +1 -1
  22. package/es/components/shops-filter/index.d.ts +99 -0
  23. package/es/components/shops-filter/index.js +1614 -0
  24. package/es/components/shops-filter/src/shops-filter.d.ts +25 -0
  25. package/es/components/shops-filter/src/shops-filter.vue.d.ts +98 -0
  26. package/es/components/staffs-selector/index.d.ts +82 -0
  27. package/es/components/staffs-selector/index.js +1991 -0
  28. package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +79 -0
  29. package/es/components/staffs-selector/src/radioCmp.vue.d.ts +31 -0
  30. package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +81 -0
  31. package/es/components/staffs-selector/src/variedCmp.vue.d.ts +62 -0
  32. package/es/components/timeline/index.d.ts +93 -0
  33. package/es/components/timeline/index.js +164 -0
  34. package/es/components/timeline/src/props.d.ts +20 -0
  35. package/es/components/timeline/src/timeline-item.vue.d.ts +51 -0
  36. package/es/components/timeline/src/timeline.vue.d.ts +42 -0
  37. package/es/components/upload/index.d.ts +126 -0
  38. package/es/components/upload/index.js +1839 -0
  39. package/es/components/upload/src/icons.d.ts +13 -0
  40. package/es/components/upload/src/upload.vue.d.ts +125 -0
  41. package/es/components/upload/utils/index.d.ts +7 -0
  42. package/index.esm.js +62925 -1235
  43. package/index.js +63078 -1380
  44. package/lib/components/button/index.d.ts +9 -9
  45. package/lib/components/button/index.js +1 -1
  46. package/lib/components/button/src/button.vue.d.ts +9 -9
  47. package/lib/components/float-table/index.d.ts +5 -0
  48. package/lib/components/float-table/index.js +459 -0
  49. package/lib/components/float-table/src/float-table.vue.d.ts +500 -0
  50. package/lib/components/flow-designer/index.js +1 -1
  51. package/lib/components/form-designer/index.js +1 -1
  52. package/lib/components/index.d.ts +7 -0
  53. package/lib/components/index.js +49 -0
  54. package/lib/components/multi-cascader-compose/index.d.ts +135 -0
  55. package/lib/components/multi-cascader-compose/index.js +1704 -0
  56. package/lib/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +135 -0
  57. package/lib/components/multi-cascader-compose/src/props.d.ts +32 -0
  58. package/lib/components/multi-cascader-compose/types.d.ts +10 -0
  59. package/lib/components/over-tooltips/index.d.ts +35 -0
  60. package/lib/components/over-tooltips/index.js +122 -0
  61. package/lib/components/over-tooltips/src/over-tooltips.vue.d.ts +34 -0
  62. package/lib/components/search-filter/index.d.ts +1 -1
  63. package/lib/components/search-filter/index.js +592 -28
  64. package/lib/components/search-filter/src/search-filter.vue.d.ts +1 -1
  65. package/lib/components/shops-filter/index.d.ts +99 -0
  66. package/lib/components/shops-filter/index.js +1626 -0
  67. package/lib/components/shops-filter/src/shops-filter.d.ts +25 -0
  68. package/lib/components/shops-filter/src/shops-filter.vue.d.ts +98 -0
  69. package/lib/components/staffs-selector/index.d.ts +82 -0
  70. package/lib/components/staffs-selector/index.js +2005 -0
  71. package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +79 -0
  72. package/lib/components/staffs-selector/src/radioCmp.vue.d.ts +31 -0
  73. package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +81 -0
  74. package/lib/components/staffs-selector/src/variedCmp.vue.d.ts +62 -0
  75. package/lib/components/timeline/index.d.ts +93 -0
  76. package/lib/components/timeline/index.js +170 -0
  77. package/lib/components/timeline/src/props.d.ts +20 -0
  78. package/lib/components/timeline/src/timeline-item.vue.d.ts +51 -0
  79. package/lib/components/timeline/src/timeline.vue.d.ts +42 -0
  80. package/lib/components/upload/index.d.ts +126 -0
  81. package/lib/components/upload/index.js +1844 -0
  82. package/lib/components/upload/src/icons.d.ts +13 -0
  83. package/lib/components/upload/src/upload.vue.d.ts +125 -0
  84. package/lib/components/upload/utils/index.d.ts +7 -0
  85. package/package.json +6 -3
  86. package/theme-chalk/button.css +1 -1
  87. package/theme-chalk/float-table.css +1 -0
  88. package/theme-chalk/floating-vue.css +1 -0
  89. package/theme-chalk/flow-designer.css +1 -1
  90. package/theme-chalk/index.css +1 -1
  91. package/theme-chalk/multi-cascader-compose.css +1 -0
  92. package/theme-chalk/over-tooltips.css +1 -0
  93. package/theme-chalk/search-filter.css +1 -1
  94. package/theme-chalk/shops-filter.css +1 -0
  95. package/theme-chalk/staffs-selector.css +1 -0
  96. package/theme-chalk/timeline.css +1 -0
  97. package/theme-chalk/upload.css +1 -0
  98. package/types/components/button/index.d.ts +9 -9
  99. package/types/components/button/src/button.vue.d.ts +9 -9
  100. package/types/components/float-table/index.d.ts +5 -0
  101. package/types/components/float-table/src/float-table.vue.d.ts +500 -0
  102. package/types/components/index.d.ts +7 -0
  103. package/types/components/multi-cascader-compose/index.d.ts +135 -0
  104. package/types/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +135 -0
  105. package/types/components/multi-cascader-compose/src/props.d.ts +32 -0
  106. package/types/components/multi-cascader-compose/types.d.ts +10 -0
  107. package/types/components/over-tooltips/index.d.ts +35 -0
  108. package/types/components/over-tooltips/src/over-tooltips.vue.d.ts +34 -0
  109. package/types/components/search-filter/index.d.ts +1 -1
  110. package/types/components/search-filter/src/search-filter.vue.d.ts +1 -1
  111. package/types/components/shops-filter/index.d.ts +99 -0
  112. package/types/components/shops-filter/src/shops-filter.d.ts +25 -0
  113. package/types/components/shops-filter/src/shops-filter.vue.d.ts +98 -0
  114. package/types/components/staffs-selector/index.d.ts +82 -0
  115. package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +79 -0
  116. package/types/components/staffs-selector/src/radioCmp.vue.d.ts +31 -0
  117. package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +81 -0
  118. package/types/components/staffs-selector/src/variedCmp.vue.d.ts +62 -0
  119. package/types/components/timeline/index.d.ts +93 -0
  120. package/types/components/timeline/src/props.d.ts +20 -0
  121. package/types/components/timeline/src/timeline-item.vue.d.ts +51 -0
  122. package/types/components/timeline/src/timeline.vue.d.ts +42 -0
  123. package/types/components/upload/index.d.ts +126 -0
  124. package/types/components/upload/src/icons.d.ts +13 -0
  125. package/types/components/upload/src/upload.vue.d.ts +125 -0
  126. package/types/components/upload/utils/index.d.ts +7 -0
@@ -0,0 +1,1844 @@
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
+
8
+ /**
9
+ * Take input from [0, n] and return it as [0, 1]
10
+ * @hidden
11
+ */
12
+ function bound01(n, max) {
13
+ if (isOnePointZero(n)) {
14
+ n = '100%';
15
+ }
16
+ var isPercent = isPercentage(n);
17
+ n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
18
+ // Automatically convert percentage into number
19
+ if (isPercent) {
20
+ n = parseInt(String(n * max), 10) / 100;
21
+ }
22
+ // Handle floating point rounding errors
23
+ if (Math.abs(n - max) < 0.000001) {
24
+ return 1;
25
+ }
26
+ // Convert into [0, 1] range if it isn't already
27
+ if (max === 360) {
28
+ // If n is a hue given in degrees,
29
+ // wrap around out-of-range values into [0, 360] range
30
+ // then convert into [0, 1].
31
+ n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));
32
+ }
33
+ else {
34
+ // If n not a hue given in degrees
35
+ // Convert into [0, 1] range if it isn't already.
36
+ n = (n % max) / parseFloat(String(max));
37
+ }
38
+ return n;
39
+ }
40
+ /**
41
+ * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
42
+ * <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
43
+ * @hidden
44
+ */
45
+ function isOnePointZero(n) {
46
+ return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;
47
+ }
48
+ /**
49
+ * Check to see if string passed in is a percentage
50
+ * @hidden
51
+ */
52
+ function isPercentage(n) {
53
+ return typeof n === 'string' && n.indexOf('%') !== -1;
54
+ }
55
+ /**
56
+ * Return a valid alpha value [0,1] with all invalid values being set to 1
57
+ * @hidden
58
+ */
59
+ function boundAlpha(a) {
60
+ a = parseFloat(a);
61
+ if (isNaN(a) || a < 0 || a > 1) {
62
+ a = 1;
63
+ }
64
+ return a;
65
+ }
66
+ /**
67
+ * Replace a decimal with it's percentage value
68
+ * @hidden
69
+ */
70
+ function convertToPercentage(n) {
71
+ if (n <= 1) {
72
+ return Number(n) * 100 + "%";
73
+ }
74
+ return n;
75
+ }
76
+ /**
77
+ * Force a hex value to have 2 characters
78
+ * @hidden
79
+ */
80
+ function pad2(c) {
81
+ return c.length === 1 ? '0' + c : String(c);
82
+ }
83
+
84
+ // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
85
+ // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
86
+ /**
87
+ * Handle bounds / percentage checking to conform to CSS color spec
88
+ * <http://www.w3.org/TR/css3-color/>
89
+ * *Assumes:* r, g, b in [0, 255] or [0, 1]
90
+ * *Returns:* { r, g, b } in [0, 255]
91
+ */
92
+ function rgbToRgb(r, g, b) {
93
+ return {
94
+ r: bound01(r, 255) * 255,
95
+ g: bound01(g, 255) * 255,
96
+ b: bound01(b, 255) * 255,
97
+ };
98
+ }
99
+ function hue2rgb(p, q, t) {
100
+ if (t < 0) {
101
+ t += 1;
102
+ }
103
+ if (t > 1) {
104
+ t -= 1;
105
+ }
106
+ if (t < 1 / 6) {
107
+ return p + (q - p) * (6 * t);
108
+ }
109
+ if (t < 1 / 2) {
110
+ return q;
111
+ }
112
+ if (t < 2 / 3) {
113
+ return p + (q - p) * (2 / 3 - t) * 6;
114
+ }
115
+ return p;
116
+ }
117
+ /**
118
+ * Converts an HSL color value to RGB.
119
+ *
120
+ * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
121
+ * *Returns:* { r, g, b } in the set [0, 255]
122
+ */
123
+ function hslToRgb(h, s, l) {
124
+ var r;
125
+ var g;
126
+ var b;
127
+ h = bound01(h, 360);
128
+ s = bound01(s, 100);
129
+ l = bound01(l, 100);
130
+ if (s === 0) {
131
+ // achromatic
132
+ g = l;
133
+ b = l;
134
+ r = l;
135
+ }
136
+ else {
137
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
138
+ var p = 2 * l - q;
139
+ r = hue2rgb(p, q, h + 1 / 3);
140
+ g = hue2rgb(p, q, h);
141
+ b = hue2rgb(p, q, h - 1 / 3);
142
+ }
143
+ return { r: r * 255, g: g * 255, b: b * 255 };
144
+ }
145
+ /**
146
+ * Converts an RGB color value to HSV
147
+ *
148
+ * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
149
+ * *Returns:* { h, s, v } in [0,1]
150
+ */
151
+ function rgbToHsv(r, g, b) {
152
+ r = bound01(r, 255);
153
+ g = bound01(g, 255);
154
+ b = bound01(b, 255);
155
+ var max = Math.max(r, g, b);
156
+ var min = Math.min(r, g, b);
157
+ var h = 0;
158
+ var v = max;
159
+ var d = max - min;
160
+ var s = max === 0 ? 0 : d / max;
161
+ if (max === min) {
162
+ h = 0; // achromatic
163
+ }
164
+ else {
165
+ switch (max) {
166
+ case r:
167
+ h = (g - b) / d + (g < b ? 6 : 0);
168
+ break;
169
+ case g:
170
+ h = (b - r) / d + 2;
171
+ break;
172
+ case b:
173
+ h = (r - g) / d + 4;
174
+ break;
175
+ }
176
+ h /= 6;
177
+ }
178
+ return { h: h, s: s, v: v };
179
+ }
180
+ /**
181
+ * Converts an HSV color value to RGB.
182
+ *
183
+ * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
184
+ * *Returns:* { r, g, b } in the set [0, 255]
185
+ */
186
+ function hsvToRgb(h, s, v) {
187
+ h = bound01(h, 360) * 6;
188
+ s = bound01(s, 100);
189
+ v = bound01(v, 100);
190
+ var i = Math.floor(h);
191
+ var f = h - i;
192
+ var p = v * (1 - s);
193
+ var q = v * (1 - f * s);
194
+ var t = v * (1 - (1 - f) * s);
195
+ var mod = i % 6;
196
+ var r = [v, q, p, p, t, v][mod];
197
+ var g = [t, v, v, q, p, p][mod];
198
+ var b = [p, p, t, v, v, q][mod];
199
+ return { r: r * 255, g: g * 255, b: b * 255 };
200
+ }
201
+ /**
202
+ * Converts an RGB color to hex
203
+ *
204
+ * Assumes r, g, and b are contained in the set [0, 255]
205
+ * Returns a 3 or 6 character hex
206
+ */
207
+ function rgbToHex(r, g, b, allow3Char) {
208
+ var hex = [
209
+ pad2(Math.round(r).toString(16)),
210
+ pad2(Math.round(g).toString(16)),
211
+ pad2(Math.round(b).toString(16)),
212
+ ];
213
+ // Return a 3 character hex if possible
214
+ if (allow3Char &&
215
+ hex[0].startsWith(hex[0].charAt(1)) &&
216
+ hex[1].startsWith(hex[1].charAt(1)) &&
217
+ hex[2].startsWith(hex[2].charAt(1))) {
218
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
219
+ }
220
+ return hex.join('');
221
+ }
222
+ /** Converts a hex value to a decimal */
223
+ function convertHexToDecimal(h) {
224
+ return parseIntFromHex(h) / 255;
225
+ }
226
+ /** Parse a base-16 hex value into a base-10 integer */
227
+ function parseIntFromHex(val) {
228
+ return parseInt(val, 16);
229
+ }
230
+
231
+ // https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json
232
+ /**
233
+ * @hidden
234
+ */
235
+ var names = {
236
+ aliceblue: '#f0f8ff',
237
+ antiquewhite: '#faebd7',
238
+ aqua: '#00ffff',
239
+ aquamarine: '#7fffd4',
240
+ azure: '#f0ffff',
241
+ beige: '#f5f5dc',
242
+ bisque: '#ffe4c4',
243
+ black: '#000000',
244
+ blanchedalmond: '#ffebcd',
245
+ blue: '#0000ff',
246
+ blueviolet: '#8a2be2',
247
+ brown: '#a52a2a',
248
+ burlywood: '#deb887',
249
+ cadetblue: '#5f9ea0',
250
+ chartreuse: '#7fff00',
251
+ chocolate: '#d2691e',
252
+ coral: '#ff7f50',
253
+ cornflowerblue: '#6495ed',
254
+ cornsilk: '#fff8dc',
255
+ crimson: '#dc143c',
256
+ cyan: '#00ffff',
257
+ darkblue: '#00008b',
258
+ darkcyan: '#008b8b',
259
+ darkgoldenrod: '#b8860b',
260
+ darkgray: '#a9a9a9',
261
+ darkgreen: '#006400',
262
+ darkgrey: '#a9a9a9',
263
+ darkkhaki: '#bdb76b',
264
+ darkmagenta: '#8b008b',
265
+ darkolivegreen: '#556b2f',
266
+ darkorange: '#ff8c00',
267
+ darkorchid: '#9932cc',
268
+ darkred: '#8b0000',
269
+ darksalmon: '#e9967a',
270
+ darkseagreen: '#8fbc8f',
271
+ darkslateblue: '#483d8b',
272
+ darkslategray: '#2f4f4f',
273
+ darkslategrey: '#2f4f4f',
274
+ darkturquoise: '#00ced1',
275
+ darkviolet: '#9400d3',
276
+ deeppink: '#ff1493',
277
+ deepskyblue: '#00bfff',
278
+ dimgray: '#696969',
279
+ dimgrey: '#696969',
280
+ dodgerblue: '#1e90ff',
281
+ firebrick: '#b22222',
282
+ floralwhite: '#fffaf0',
283
+ forestgreen: '#228b22',
284
+ fuchsia: '#ff00ff',
285
+ gainsboro: '#dcdcdc',
286
+ ghostwhite: '#f8f8ff',
287
+ goldenrod: '#daa520',
288
+ gold: '#ffd700',
289
+ gray: '#808080',
290
+ green: '#008000',
291
+ greenyellow: '#adff2f',
292
+ grey: '#808080',
293
+ honeydew: '#f0fff0',
294
+ hotpink: '#ff69b4',
295
+ indianred: '#cd5c5c',
296
+ indigo: '#4b0082',
297
+ ivory: '#fffff0',
298
+ khaki: '#f0e68c',
299
+ lavenderblush: '#fff0f5',
300
+ lavender: '#e6e6fa',
301
+ lawngreen: '#7cfc00',
302
+ lemonchiffon: '#fffacd',
303
+ lightblue: '#add8e6',
304
+ lightcoral: '#f08080',
305
+ lightcyan: '#e0ffff',
306
+ lightgoldenrodyellow: '#fafad2',
307
+ lightgray: '#d3d3d3',
308
+ lightgreen: '#90ee90',
309
+ lightgrey: '#d3d3d3',
310
+ lightpink: '#ffb6c1',
311
+ lightsalmon: '#ffa07a',
312
+ lightseagreen: '#20b2aa',
313
+ lightskyblue: '#87cefa',
314
+ lightslategray: '#778899',
315
+ lightslategrey: '#778899',
316
+ lightsteelblue: '#b0c4de',
317
+ lightyellow: '#ffffe0',
318
+ lime: '#00ff00',
319
+ limegreen: '#32cd32',
320
+ linen: '#faf0e6',
321
+ magenta: '#ff00ff',
322
+ maroon: '#800000',
323
+ mediumaquamarine: '#66cdaa',
324
+ mediumblue: '#0000cd',
325
+ mediumorchid: '#ba55d3',
326
+ mediumpurple: '#9370db',
327
+ mediumseagreen: '#3cb371',
328
+ mediumslateblue: '#7b68ee',
329
+ mediumspringgreen: '#00fa9a',
330
+ mediumturquoise: '#48d1cc',
331
+ mediumvioletred: '#c71585',
332
+ midnightblue: '#191970',
333
+ mintcream: '#f5fffa',
334
+ mistyrose: '#ffe4e1',
335
+ moccasin: '#ffe4b5',
336
+ navajowhite: '#ffdead',
337
+ navy: '#000080',
338
+ oldlace: '#fdf5e6',
339
+ olive: '#808000',
340
+ olivedrab: '#6b8e23',
341
+ orange: '#ffa500',
342
+ orangered: '#ff4500',
343
+ orchid: '#da70d6',
344
+ palegoldenrod: '#eee8aa',
345
+ palegreen: '#98fb98',
346
+ paleturquoise: '#afeeee',
347
+ palevioletred: '#db7093',
348
+ papayawhip: '#ffefd5',
349
+ peachpuff: '#ffdab9',
350
+ peru: '#cd853f',
351
+ pink: '#ffc0cb',
352
+ plum: '#dda0dd',
353
+ powderblue: '#b0e0e6',
354
+ purple: '#800080',
355
+ rebeccapurple: '#663399',
356
+ red: '#ff0000',
357
+ rosybrown: '#bc8f8f',
358
+ royalblue: '#4169e1',
359
+ saddlebrown: '#8b4513',
360
+ salmon: '#fa8072',
361
+ sandybrown: '#f4a460',
362
+ seagreen: '#2e8b57',
363
+ seashell: '#fff5ee',
364
+ sienna: '#a0522d',
365
+ silver: '#c0c0c0',
366
+ skyblue: '#87ceeb',
367
+ slateblue: '#6a5acd',
368
+ slategray: '#708090',
369
+ slategrey: '#708090',
370
+ snow: '#fffafa',
371
+ springgreen: '#00ff7f',
372
+ steelblue: '#4682b4',
373
+ tan: '#d2b48c',
374
+ teal: '#008080',
375
+ thistle: '#d8bfd8',
376
+ tomato: '#ff6347',
377
+ turquoise: '#40e0d0',
378
+ violet: '#ee82ee',
379
+ wheat: '#f5deb3',
380
+ white: '#ffffff',
381
+ whitesmoke: '#f5f5f5',
382
+ yellow: '#ffff00',
383
+ yellowgreen: '#9acd32',
384
+ };
385
+
386
+ /**
387
+ * Given a string or object, convert that input to RGB
388
+ *
389
+ * Possible string inputs:
390
+ * ```
391
+ * "red"
392
+ * "#f00" or "f00"
393
+ * "#ff0000" or "ff0000"
394
+ * "#ff000000" or "ff000000"
395
+ * "rgb 255 0 0" or "rgb (255, 0, 0)"
396
+ * "rgb 1.0 0 0" or "rgb (1, 0, 0)"
397
+ * "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
398
+ * "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
399
+ * "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
400
+ * "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
401
+ * "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
402
+ * ```
403
+ */
404
+ function inputToRGB(color) {
405
+ var rgb = { r: 0, g: 0, b: 0 };
406
+ var a = 1;
407
+ var s = null;
408
+ var v = null;
409
+ var l = null;
410
+ var ok = false;
411
+ var format = false;
412
+ if (typeof color === 'string') {
413
+ color = stringInputToObject(color);
414
+ }
415
+ if (typeof color === 'object') {
416
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
417
+ rgb = rgbToRgb(color.r, color.g, color.b);
418
+ ok = true;
419
+ format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';
420
+ }
421
+ else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
422
+ s = convertToPercentage(color.s);
423
+ v = convertToPercentage(color.v);
424
+ rgb = hsvToRgb(color.h, s, v);
425
+ ok = true;
426
+ format = 'hsv';
427
+ }
428
+ else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
429
+ s = convertToPercentage(color.s);
430
+ l = convertToPercentage(color.l);
431
+ rgb = hslToRgb(color.h, s, l);
432
+ ok = true;
433
+ format = 'hsl';
434
+ }
435
+ if (Object.prototype.hasOwnProperty.call(color, 'a')) {
436
+ a = color.a;
437
+ }
438
+ }
439
+ a = boundAlpha(a);
440
+ return {
441
+ ok: ok,
442
+ format: color.format || format,
443
+ r: Math.min(255, Math.max(rgb.r, 0)),
444
+ g: Math.min(255, Math.max(rgb.g, 0)),
445
+ b: Math.min(255, Math.max(rgb.b, 0)),
446
+ a: a,
447
+ };
448
+ }
449
+ // <http://www.w3.org/TR/css3-values/#integers>
450
+ var CSS_INTEGER = '[-\\+]?\\d+%?';
451
+ // <http://www.w3.org/TR/css3-values/#number-value>
452
+ var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
453
+ // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
454
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
455
+ // Actual matching.
456
+ // Parentheses and commas are optional, but not required.
457
+ // Whitespace can take the place of commas or opening paren
458
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
459
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
460
+ var matchers = {
461
+ CSS_UNIT: new RegExp(CSS_UNIT),
462
+ rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
463
+ rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),
464
+ hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),
465
+ hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),
466
+ hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),
467
+ hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),
468
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
469
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
470
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
471
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
472
+ };
473
+ /**
474
+ * Permissive string parsing. Take in a number of formats, and output an object
475
+ * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
476
+ */
477
+ function stringInputToObject(color) {
478
+ color = color.trim().toLowerCase();
479
+ if (color.length === 0) {
480
+ return false;
481
+ }
482
+ var named = false;
483
+ if (names[color]) {
484
+ color = names[color];
485
+ named = true;
486
+ }
487
+ else if (color === 'transparent') {
488
+ return { r: 0, g: 0, b: 0, a: 0, format: 'name' };
489
+ }
490
+ // Try to match string input using regular expressions.
491
+ // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
492
+ // Just return an object and let the conversion functions handle that.
493
+ // This way the result will be the same whether the tinycolor is initialized with string or object.
494
+ var match = matchers.rgb.exec(color);
495
+ if (match) {
496
+ return { r: match[1], g: match[2], b: match[3] };
497
+ }
498
+ match = matchers.rgba.exec(color);
499
+ if (match) {
500
+ return { r: match[1], g: match[2], b: match[3], a: match[4] };
501
+ }
502
+ match = matchers.hsl.exec(color);
503
+ if (match) {
504
+ return { h: match[1], s: match[2], l: match[3] };
505
+ }
506
+ match = matchers.hsla.exec(color);
507
+ if (match) {
508
+ return { h: match[1], s: match[2], l: match[3], a: match[4] };
509
+ }
510
+ match = matchers.hsv.exec(color);
511
+ if (match) {
512
+ return { h: match[1], s: match[2], v: match[3] };
513
+ }
514
+ match = matchers.hsva.exec(color);
515
+ if (match) {
516
+ return { h: match[1], s: match[2], v: match[3], a: match[4] };
517
+ }
518
+ match = matchers.hex8.exec(color);
519
+ if (match) {
520
+ return {
521
+ r: parseIntFromHex(match[1]),
522
+ g: parseIntFromHex(match[2]),
523
+ b: parseIntFromHex(match[3]),
524
+ a: convertHexToDecimal(match[4]),
525
+ format: named ? 'name' : 'hex8',
526
+ };
527
+ }
528
+ match = matchers.hex6.exec(color);
529
+ if (match) {
530
+ return {
531
+ r: parseIntFromHex(match[1]),
532
+ g: parseIntFromHex(match[2]),
533
+ b: parseIntFromHex(match[3]),
534
+ format: named ? 'name' : 'hex',
535
+ };
536
+ }
537
+ match = matchers.hex4.exec(color);
538
+ if (match) {
539
+ return {
540
+ r: parseIntFromHex(match[1] + match[1]),
541
+ g: parseIntFromHex(match[2] + match[2]),
542
+ b: parseIntFromHex(match[3] + match[3]),
543
+ a: convertHexToDecimal(match[4] + match[4]),
544
+ format: named ? 'name' : 'hex8',
545
+ };
546
+ }
547
+ match = matchers.hex3.exec(color);
548
+ if (match) {
549
+ return {
550
+ r: parseIntFromHex(match[1] + match[1]),
551
+ g: parseIntFromHex(match[2] + match[2]),
552
+ b: parseIntFromHex(match[3] + match[3]),
553
+ format: named ? 'name' : 'hex',
554
+ };
555
+ }
556
+ return false;
557
+ }
558
+ /**
559
+ * Check to see if it looks like a CSS unit
560
+ * (see `matchers` above for definition).
561
+ */
562
+ function isValidCSSUnit(color) {
563
+ return Boolean(matchers.CSS_UNIT.exec(String(color)));
564
+ }
565
+
566
+ var hueStep = 2; // 色相阶梯
567
+
568
+ var saturationStep = 0.16; // 饱和度阶梯,浅色部分
569
+
570
+ var saturationStep2 = 0.05; // 饱和度阶梯,深色部分
571
+
572
+ var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分
573
+
574
+ var brightnessStep2 = 0.15; // 亮度阶梯,深色部分
575
+
576
+ var lightColorCount = 5; // 浅色数量,主色上
577
+
578
+ var darkColorCount = 4; // 深色数量,主色下
579
+ // 暗色主题颜色映射关系表
580
+
581
+ var darkColorMap = [{
582
+ index: 7,
583
+ opacity: 0.15
584
+ }, {
585
+ index: 6,
586
+ opacity: 0.25
587
+ }, {
588
+ index: 5,
589
+ opacity: 0.3
590
+ }, {
591
+ index: 5,
592
+ opacity: 0.45
593
+ }, {
594
+ index: 5,
595
+ opacity: 0.65
596
+ }, {
597
+ index: 5,
598
+ opacity: 0.85
599
+ }, {
600
+ index: 4,
601
+ opacity: 0.9
602
+ }, {
603
+ index: 3,
604
+ opacity: 0.95
605
+ }, {
606
+ index: 2,
607
+ opacity: 0.97
608
+ }, {
609
+ index: 1,
610
+ opacity: 0.98
611
+ }]; // Wrapper function ported from TinyColor.prototype.toHsv
612
+ // Keep it here because of `hsv.h * 360`
613
+
614
+ function toHsv(_ref) {
615
+ var r = _ref.r,
616
+ g = _ref.g,
617
+ b = _ref.b;
618
+ var hsv = rgbToHsv(r, g, b);
619
+ return {
620
+ h: hsv.h * 360,
621
+ s: hsv.s,
622
+ v: hsv.v
623
+ };
624
+ } // Wrapper function ported from TinyColor.prototype.toHexString
625
+ // Keep it here because of the prefix `#`
626
+
627
+
628
+ function toHex(_ref2) {
629
+ var r = _ref2.r,
630
+ g = _ref2.g,
631
+ b = _ref2.b;
632
+ return "#".concat(rgbToHex(r, g, b, false));
633
+ } // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.
634
+ // Amount in range [0, 1]
635
+ // Assume color1 & color2 has no alpha, since the following src code did so.
636
+
637
+
638
+ function mix(rgb1, rgb2, amount) {
639
+ var p = amount / 100;
640
+ var rgb = {
641
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
642
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
643
+ b: (rgb2.b - rgb1.b) * p + rgb1.b
644
+ };
645
+ return rgb;
646
+ }
647
+
648
+ function getHue(hsv, i, light) {
649
+ var hue; // 根据色相不同,色相转向不同
650
+
651
+ if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
652
+ hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
653
+ } else {
654
+ hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
655
+ }
656
+
657
+ if (hue < 0) {
658
+ hue += 360;
659
+ } else if (hue >= 360) {
660
+ hue -= 360;
661
+ }
662
+
663
+ return hue;
664
+ }
665
+
666
+ function getSaturation(hsv, i, light) {
667
+ // grey color don't change saturation
668
+ if (hsv.h === 0 && hsv.s === 0) {
669
+ return hsv.s;
670
+ }
671
+
672
+ var saturation;
673
+
674
+ if (light) {
675
+ saturation = hsv.s - saturationStep * i;
676
+ } else if (i === darkColorCount) {
677
+ saturation = hsv.s + saturationStep;
678
+ } else {
679
+ saturation = hsv.s + saturationStep2 * i;
680
+ } // 边界值修正
681
+
682
+
683
+ if (saturation > 1) {
684
+ saturation = 1;
685
+ } // 第一格的 s 限制在 0.06-0.1 之间
686
+
687
+
688
+ if (light && i === lightColorCount && saturation > 0.1) {
689
+ saturation = 0.1;
690
+ }
691
+
692
+ if (saturation < 0.06) {
693
+ saturation = 0.06;
694
+ }
695
+
696
+ return Number(saturation.toFixed(2));
697
+ }
698
+
699
+ function getValue(hsv, i, light) {
700
+ var value;
701
+
702
+ if (light) {
703
+ value = hsv.v + brightnessStep1 * i;
704
+ } else {
705
+ value = hsv.v - brightnessStep2 * i;
706
+ }
707
+
708
+ if (value > 1) {
709
+ value = 1;
710
+ }
711
+
712
+ return Number(value.toFixed(2));
713
+ }
714
+
715
+ function generate$1(color) {
716
+ var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
717
+ var patterns = [];
718
+ var pColor = inputToRGB(color);
719
+
720
+ for (var i = lightColorCount; i > 0; i -= 1) {
721
+ var hsv = toHsv(pColor);
722
+ var colorString = toHex(inputToRGB({
723
+ h: getHue(hsv, i, true),
724
+ s: getSaturation(hsv, i, true),
725
+ v: getValue(hsv, i, true)
726
+ }));
727
+ patterns.push(colorString);
728
+ }
729
+
730
+ patterns.push(toHex(pColor));
731
+
732
+ for (var _i = 1; _i <= darkColorCount; _i += 1) {
733
+ var _hsv = toHsv(pColor);
734
+
735
+ var _colorString = toHex(inputToRGB({
736
+ h: getHue(_hsv, _i),
737
+ s: getSaturation(_hsv, _i),
738
+ v: getValue(_hsv, _i)
739
+ }));
740
+
741
+ patterns.push(_colorString);
742
+ } // dark theme patterns
743
+
744
+
745
+ if (opts.theme === 'dark') {
746
+ return darkColorMap.map(function (_ref3) {
747
+ var index = _ref3.index,
748
+ opacity = _ref3.opacity;
749
+ var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || '#141414'), inputToRGB(patterns[index]), opacity * 100));
750
+ return darkColorString;
751
+ });
752
+ }
753
+
754
+ return patterns;
755
+ }
756
+
757
+ var presetPrimaryColors = {
758
+ red: '#F5222D',
759
+ volcano: '#FA541C',
760
+ orange: '#FA8C16',
761
+ gold: '#FAAD14',
762
+ yellow: '#FADB14',
763
+ lime: '#A0D911',
764
+ green: '#52C41A',
765
+ cyan: '#13C2C2',
766
+ blue: '#1890FF',
767
+ geekblue: '#2F54EB',
768
+ purple: '#722ED1',
769
+ magenta: '#EB2F96',
770
+ grey: '#666666'
771
+ };
772
+ var presetPalettes = {};
773
+ var presetDarkPalettes = {};
774
+ Object.keys(presetPrimaryColors).forEach(function (key) {
775
+ presetPalettes[key] = generate$1(presetPrimaryColors[key]);
776
+ presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes
777
+
778
+ presetDarkPalettes[key] = generate$1(presetPrimaryColors[key], {
779
+ theme: 'dark',
780
+ backgroundColor: '#141414'
781
+ });
782
+ presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
783
+ });
784
+ presetPalettes.red;
785
+ presetPalettes.volcano;
786
+ presetPalettes.gold;
787
+ presetPalettes.orange;
788
+ presetPalettes.yellow;
789
+ presetPalettes.lime;
790
+ presetPalettes.green;
791
+ presetPalettes.cyan;
792
+ presetPalettes.blue;
793
+ presetPalettes.geekblue;
794
+ presetPalettes.purple;
795
+ presetPalettes.magenta;
796
+ presetPalettes.grey;
797
+
798
+ // https://github.com/substack/insert-css
799
+ var containers = []; // will store container HTMLElement references
800
+
801
+ var styleElements = []; // will store {prepend: HTMLElement, append: HTMLElement}
802
+
803
+ var usage = 'insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).';
804
+
805
+ function createStyleElement() {
806
+ var styleElement = document.createElement('style');
807
+ styleElement.setAttribute('type', 'text/css');
808
+ return styleElement;
809
+ } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
810
+
811
+
812
+ function insertCss(css, options) {
813
+ options = options || {};
814
+
815
+ if (css === undefined) {
816
+ throw new Error(usage);
817
+ }
818
+
819
+ var position = options.prepend === true ? 'prepend' : 'append';
820
+ var container = options.container !== undefined ? options.container : document.querySelector('head');
821
+ var containerId = containers.indexOf(container); // first time we see this container, create the necessary entries
822
+
823
+ if (containerId === -1) {
824
+ containerId = containers.push(container) - 1;
825
+ styleElements[containerId] = {};
826
+ } // try to get the correponding container + position styleElement, create it otherwise
827
+
828
+
829
+ var styleElement;
830
+
831
+ if (styleElements[containerId] !== undefined && styleElements[containerId][position] !== undefined) {
832
+ styleElement = styleElements[containerId][position];
833
+ } else {
834
+ styleElement = styleElements[containerId][position] = createStyleElement();
835
+
836
+ if (position === 'prepend') {
837
+ container.insertBefore(styleElement, container.childNodes[0]);
838
+ } else {
839
+ container.appendChild(styleElement);
840
+ }
841
+ } // strip potential UTF-8 BOM if css was read from a file
842
+
843
+
844
+ if (css.charCodeAt(0) === 0xfeff) {
845
+ css = css.substr(1, css.length);
846
+ } // actually add the stylesheet
847
+
848
+
849
+ if (styleElement.styleSheet) {
850
+ styleElement.styleSheet.cssText += css;
851
+ } else {
852
+ styleElement.textContent += css;
853
+ }
854
+
855
+ return styleElement;
856
+ }
857
+
858
+ function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$4(target, key, source[key]); }); } return target; }
859
+
860
+ function _defineProperty$4(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; }
861
+ function warn(valid, message) {
862
+ // Support uglify
863
+ if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
864
+ console.error("Warning: ".concat(message));
865
+ }
866
+ }
867
+ function warning(valid, message) {
868
+ warn(valid, "[@ant-design/icons-vue] ".concat(message));
869
+ } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
870
+
871
+ function isIconDefinition(target) {
872
+ return typeof target === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && (typeof target.icon === 'object' || typeof target.icon === 'function');
873
+ }
874
+ function generate(node, key, rootProps) {
875
+ if (!rootProps) {
876
+ return vue.h(node.tag, _objectSpread$4({
877
+ key: key
878
+ }, node.attrs), (node.children || []).map(function (child, index) {
879
+ return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
880
+ }));
881
+ }
882
+
883
+ return vue.h(node.tag, _objectSpread$4({
884
+ key: key
885
+ }, rootProps, node.attrs), (node.children || []).map(function (child, index) {
886
+ return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
887
+ }));
888
+ }
889
+ function getSecondaryColor(primaryColor) {
890
+ // choose the second color
891
+ return generate$1(primaryColor)[0];
892
+ }
893
+ function normalizeTwoToneColors(twoToneColor) {
894
+ if (!twoToneColor) {
895
+ return [];
896
+ }
897
+
898
+ return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
899
+ } // These props make sure that the SVG behaviours like general text.
900
+ var iconStyles = "\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
901
+ var cssInjectedFlag = false;
902
+ var useInsertStyles = function useInsertStyles() {
903
+ var styleStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : iconStyles;
904
+ vue.nextTick(function () {
905
+ if (!cssInjectedFlag) {
906
+ if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
907
+ insertCss(styleStr, {
908
+ prepend: true
909
+ });
910
+ }
911
+
912
+ cssInjectedFlag = true;
913
+ }
914
+ });
915
+ };
916
+
917
+ var _excluded$1 = ["icon", "primaryColor", "secondaryColor"];
918
+
919
+ function _objectWithoutProperties$1(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$1(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; }
920
+
921
+ function _objectWithoutPropertiesLoose$1(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; }
922
+
923
+ function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$3(target, key, source[key]); }); } return target; }
924
+
925
+ function _defineProperty$3(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; }
926
+ var twoToneColorPalette = {
927
+ primaryColor: '#333',
928
+ secondaryColor: '#E6E6E6',
929
+ calculated: false
930
+ };
931
+
932
+ function setTwoToneColors(_ref) {
933
+ var primaryColor = _ref.primaryColor,
934
+ secondaryColor = _ref.secondaryColor;
935
+ twoToneColorPalette.primaryColor = primaryColor;
936
+ twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
937
+ twoToneColorPalette.calculated = !!secondaryColor;
938
+ }
939
+
940
+ function getTwoToneColors() {
941
+ return _objectSpread$3({}, twoToneColorPalette);
942
+ }
943
+
944
+ var IconBase = function IconBase(props, context) {
945
+ var _props$context$attrs = _objectSpread$3({}, props, context.attrs),
946
+ icon = _props$context$attrs.icon,
947
+ primaryColor = _props$context$attrs.primaryColor,
948
+ secondaryColor = _props$context$attrs.secondaryColor,
949
+ restProps = _objectWithoutProperties$1(_props$context$attrs, _excluded$1);
950
+
951
+ var colors = twoToneColorPalette;
952
+
953
+ if (primaryColor) {
954
+ colors = {
955
+ primaryColor: primaryColor,
956
+ secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
957
+ };
958
+ }
959
+
960
+ useInsertStyles();
961
+ warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
962
+
963
+ if (!isIconDefinition(icon)) {
964
+ return null;
965
+ }
966
+
967
+ var target = icon;
968
+
969
+ if (target && typeof target.icon === 'function') {
970
+ target = _objectSpread$3({}, target, {
971
+ icon: target.icon(colors.primaryColor, colors.secondaryColor)
972
+ });
973
+ }
974
+
975
+ return generate(target.icon, "svg-".concat(target.name), _objectSpread$3({}, restProps, {
976
+ 'data-icon': target.name,
977
+ width: '1em',
978
+ height: '1em',
979
+ fill: 'currentColor',
980
+ 'aria-hidden': 'true'
981
+ })); // },
982
+ };
983
+
984
+ IconBase.props = {
985
+ icon: Object,
986
+ primaryColor: String,
987
+ secondaryColor: String,
988
+ focusable: String
989
+ };
990
+ IconBase.inheritAttrs = false;
991
+ IconBase.displayName = 'IconBase';
992
+ IconBase.getTwoToneColors = getTwoToneColors;
993
+ IconBase.setTwoToneColors = setTwoToneColors;
994
+ var VueIcon = IconBase;
995
+
996
+ function _slicedToArray$1(arr, i) { return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1(); }
997
+
998
+ function _nonIterableRest$1() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
999
+
1000
+ function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(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$1(o, minLen); }
1001
+
1002
+ function _arrayLikeToArray$1(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; }
1003
+
1004
+ function _iterableToArrayLimit$1(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; }
1005
+
1006
+ function _arrayWithHoles$1(arr) { if (Array.isArray(arr)) return arr; }
1007
+ function setTwoToneColor(twoToneColor) {
1008
+ var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
1009
+ _normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2),
1010
+ primaryColor = _normalizeTwoToneColo2[0],
1011
+ secondaryColor = _normalizeTwoToneColo2[1];
1012
+
1013
+ return VueIcon.setTwoToneColors({
1014
+ primaryColor: primaryColor,
1015
+ secondaryColor: secondaryColor
1016
+ });
1017
+ }
1018
+ function getTwoToneColor() {
1019
+ var colors = VueIcon.getTwoToneColors();
1020
+
1021
+ if (!colors.calculated) {
1022
+ return colors.primaryColor;
1023
+ }
1024
+
1025
+ return [colors.primaryColor, colors.secondaryColor];
1026
+ }
1027
+
1028
+ var _excluded = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
1029
+
1030
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1031
+
1032
+ 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."); }
1033
+
1034
+ 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); }
1035
+
1036
+ 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; }
1037
+
1038
+ 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; }
1039
+
1040
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1041
+
1042
+ function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$2(target, key, source[key]); }); } return target; }
1043
+
1044
+ function _defineProperty$2(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; }
1045
+
1046
+ 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; }
1047
+
1048
+ 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; }
1049
+
1050
+ setTwoToneColor('#1890ff');
1051
+
1052
+ var Icon = function Icon(props, context) {
1053
+ var _classObj;
1054
+
1055
+ var _props$context$attrs = _objectSpread$2({}, props, context.attrs),
1056
+ cls = _props$context$attrs["class"],
1057
+ icon = _props$context$attrs.icon,
1058
+ spin = _props$context$attrs.spin,
1059
+ rotate = _props$context$attrs.rotate,
1060
+ tabindex = _props$context$attrs.tabindex,
1061
+ twoToneColor = _props$context$attrs.twoToneColor,
1062
+ onClick = _props$context$attrs.onClick,
1063
+ restProps = _objectWithoutProperties(_props$context$attrs, _excluded);
1064
+
1065
+ var classObj = (_classObj = {
1066
+ anticon: true
1067
+ }, _defineProperty$2(_classObj, "anticon-".concat(icon.name), Boolean(icon.name)), _defineProperty$2(_classObj, cls, cls), _classObj);
1068
+ var svgClassString = spin === '' || !!spin || icon.name === 'loading' ? 'anticon-spin' : '';
1069
+ var iconTabIndex = tabindex;
1070
+
1071
+ if (iconTabIndex === undefined && onClick) {
1072
+ iconTabIndex = -1;
1073
+ restProps.tabindex = iconTabIndex;
1074
+ }
1075
+
1076
+ var svgStyle = rotate ? {
1077
+ msTransform: "rotate(".concat(rotate, "deg)"),
1078
+ transform: "rotate(".concat(rotate, "deg)")
1079
+ } : undefined;
1080
+
1081
+ var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
1082
+ _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),
1083
+ primaryColor = _normalizeTwoToneColo2[0],
1084
+ secondaryColor = _normalizeTwoToneColo2[1];
1085
+
1086
+ return vue.createVNode("span", _objectSpread$2({
1087
+ "role": "img",
1088
+ "aria-label": icon.name
1089
+ }, restProps, {
1090
+ "onClick": onClick,
1091
+ "class": classObj
1092
+ }), [vue.createVNode(VueIcon, {
1093
+ "class": svgClassString,
1094
+ "icon": icon,
1095
+ "primaryColor": primaryColor,
1096
+ "secondaryColor": secondaryColor,
1097
+ "style": svgStyle
1098
+ }, null)]);
1099
+ };
1100
+
1101
+ Icon.props = {
1102
+ spin: Boolean,
1103
+ rotate: Number,
1104
+ icon: Object,
1105
+ twoToneColor: String
1106
+ };
1107
+ Icon.displayName = 'AntdIcon';
1108
+ Icon.inheritAttrs = false;
1109
+ Icon.getTwoToneColor = getTwoToneColor;
1110
+ Icon.setTwoToneColor = setTwoToneColor;
1111
+ var AntdIcon = Icon;
1112
+
1113
+ // This icon file is generated automatically.
1114
+ var PlusOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { "tag": "path", "attrs": { "d": "M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z" } }] }, "name": "plus", "theme": "outlined" };
1115
+ var PlusOutlinedSvg = PlusOutlined$2;
1116
+
1117
+ function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; }
1118
+
1119
+ function _defineProperty$1(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; }
1120
+
1121
+ var PlusOutlined = function PlusOutlined(props, context) {
1122
+ var p = _objectSpread$1({}, props, context.attrs);
1123
+
1124
+ return vue.createVNode(AntdIcon, _objectSpread$1({}, p, {
1125
+ "icon": PlusOutlinedSvg
1126
+ }), null);
1127
+ };
1128
+
1129
+ PlusOutlined.displayName = 'PlusOutlined';
1130
+ PlusOutlined.inheritAttrs = false;
1131
+ var PlusOutlined$1 = PlusOutlined;
1132
+
1133
+ // This icon file is generated automatically.
1134
+ var UploadOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, "name": "upload", "theme": "outlined" };
1135
+ var UploadOutlinedSvg = UploadOutlined$2;
1136
+
1137
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
1138
+
1139
+ 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; }
1140
+
1141
+ var UploadOutlined = function UploadOutlined(props, context) {
1142
+ var p = _objectSpread({}, props, context.attrs);
1143
+
1144
+ return vue.createVNode(AntdIcon, _objectSpread({}, p, {
1145
+ "icon": UploadOutlinedSvg
1146
+ }), null);
1147
+ };
1148
+
1149
+ UploadOutlined.displayName = 'UploadOutlined';
1150
+ UploadOutlined.inheritAttrs = false;
1151
+ var UploadOutlined$1 = UploadOutlined;
1152
+
1153
+ var _export_sfc = (sfc, props) => {
1154
+ const target = sfc.__vccOpts || sfc;
1155
+ for (const [key, val] of props) {
1156
+ target[key] = val;
1157
+ }
1158
+ return target;
1159
+ };
1160
+
1161
+ const _sfc_main$1 = {
1162
+ name: "BmOverTooltips",
1163
+ props: {
1164
+ title: {
1165
+ type: String,
1166
+ default: ""
1167
+ },
1168
+ labelTitle: {
1169
+ type: String,
1170
+ default: ""
1171
+ },
1172
+ line: {
1173
+ type: Number,
1174
+ default: 1
1175
+ },
1176
+ width: {
1177
+ type: [Number, String],
1178
+ default: 0
1179
+ },
1180
+ showAlways: {
1181
+ type: Boolean,
1182
+ default: false
1183
+ }
1184
+ },
1185
+ setup(props, context) {
1186
+ const state = vue.reactive({
1187
+ mSlots: {},
1188
+ isShow: false,
1189
+ openShow: false
1190
+ });
1191
+ const observer = new IntersectionObserver((entries) => {
1192
+ entries.forEach((item) => {
1193
+ if (item.intersectionRatio > 0.3) {
1194
+ observerDom();
1195
+ observer.disconnect();
1196
+ }
1197
+ });
1198
+ }, {
1199
+ threshold: 0.3
1200
+ });
1201
+ function observerDom() {
1202
+ if (props.line === 1) {
1203
+ if (mySelf.value.scrollWidth > mySelf.value.clientWidth) {
1204
+ state.openShow = true;
1205
+ }
1206
+ } else if (props.line > 1) {
1207
+ if (mySelf.value.scrollHeight > mySelf.value.clientHeight) {
1208
+ state.openShow = true;
1209
+ }
1210
+ }
1211
+ }
1212
+ vue.onBeforeUnmount(function() {
1213
+ observer.disconnect();
1214
+ });
1215
+ let mySelf = vue.ref();
1216
+ vue.watch(() => props.showAlways, function(showAlways) {
1217
+ if (showAlways)
1218
+ state.openShow = showAlways;
1219
+ mySelf.value && observer.unobserve(mySelf.value);
1220
+ vue.nextTick(function() {
1221
+ mySelf.value && observer.observe(mySelf.value);
1222
+ });
1223
+ }, {
1224
+ immediate: true
1225
+ });
1226
+ const handleVisibleChange = (val) => {
1227
+ state.isShow = !state.openShow ? false : val;
1228
+ };
1229
+ const getPopupContainer = () => {
1230
+ return document.body;
1231
+ };
1232
+ return {
1233
+ ...vue.toRefs(state),
1234
+ mySelf,
1235
+ handleVisibleChange,
1236
+ getPopupContainer
1237
+ };
1238
+ }
1239
+ };
1240
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1241
+ const _component_a_tooltip = vue.resolveComponent("a-tooltip");
1242
+ return vue.openBlock(), vue.createBlock(_component_a_tooltip, {
1243
+ visible: _ctx.isShow,
1244
+ "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => _ctx.isShow = $event),
1245
+ title: $props.labelTitle || $props.title,
1246
+ "get-popup-container": $setup.getPopupContainer,
1247
+ onVisibleChange: $setup.handleVisibleChange
1248
+ }, {
1249
+ default: vue.withCtx(() => [
1250
+ vue.createElementVNode("div", {
1251
+ ref: "mySelf",
1252
+ style: vue.normalizeStyle({
1253
+ width: $props.width ? $props.width + "px" : "100%",
1254
+ WebkitLineClamp: $props.line
1255
+ }),
1256
+ class: vue.normalizeClass($props.line === 1 ? `bm-over-tooltip` : `bm-over-tooltip-multi`)
1257
+ }, vue.toDisplayString($props.title), 7)
1258
+ ]),
1259
+ _: 1
1260
+ }, 8, ["visible", "title", "get-popup-container", "onVisibleChange"]);
1261
+ }
1262
+ var OverTooltips$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "over-tooltips.vue"]]);
1263
+
1264
+ const BmOverTooltips = withInstall.withInstall(OverTooltips$1);
1265
+ var OverTooltips = BmOverTooltips;
1266
+
1267
+ function getuid() {
1268
+ const s = [];
1269
+ const hexDigits = '0123456789abcdef';
1270
+ for (let i = 0; i < 36; i++) {
1271
+ s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
1272
+ }
1273
+ s[14] = '4';
1274
+ s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
1275
+ s[8] = s[13] = s[18] = s[23] = '-';
1276
+ const uuid = s.join('');
1277
+ return uuid;
1278
+ }
1279
+ function wait(ms) {
1280
+ return new Promise((resolve) => setTimeout(resolve, ms));
1281
+ }
1282
+ var utils = {
1283
+ getuid,
1284
+ wait,
1285
+ };
1286
+
1287
+ const pdf = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAABmdJREFUeAHtWgtsU1UY/u6j62vdGxA35CEo8cE0qCOIMiIYBREBMU6CIKBRkZcYojwCQQRfU8FgAiohERxGMBE1kWjMEgWBgIiAIs8NBmOwdWNrt7b33l7POWWXlQ3Xdt1pO3aS23ve//995/zn8d8KIKFqXF6OV214V4CQr+t6d5qXKME+/rmi1Clzn4lUX5GBVxoOQEdBooGnoOVuOQWXNnz4ZcQE0JEnjTMi7SAe2rWFBJFO+3gA0VYdIiVBTMRpfy2yI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LBfkKn35pkW4JKqr//AJ0pA4Sn+j7flb53KDi5vQLXTobYTtQBtpK22m7X8BXxtVZAjutWYAAAAASUVORK5CYII=`;
1291
+ const others = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAAbNJREFUeAHtlTFOAkEYhWd3LaDUDYWJF7AgHsAGCjsusF6DZG1t3YO4F6CzoaYxhsILmFCQxXIJhuBMkOTFGJwdmp15/zS8bGbJfN//BiKlV54/XW2360LHgVK7S/PMlzUc3paj0d2963njPXz9psEz3+ANdJqeZ5PJy7OzgJ/JX7h+QRveO0VCrAEGbYA49QyuErQAv+78MVEuEkwDglpNJQQnwEyziYQgBTSREKwAWwlBC7CRELyA/yRQCDgmwXsBdb02fFbrr38H7wUsl5UV/GHTbwneC5jP39Vm83Xgs/pECdF4/LizeqvFm7rdjur3r1WvlyqTbVdVfZZntpvbvM/8Dsxmry5HzLy/Ai7U+I4IQBuMWRrAOHVklgagDcYsDWCcOjJLA9AGY5YGME4dmaUBaIMxSwMYp47M0gC0wZilAYxTR2ZpANpgzNIAxqkjszQAbTBmaQDj1JFZGoA2GLM0gHHqyCwNQBuMWRrAOHVklgagDcYsDWCcOjJLA9AGY9YNiBaM4HvmaGGuwJRXgJrGSdLJtYAVoYSVYY+L4uEjSbo3+iqUHNfBXPmoNMyG/RuvFms2+co7XAAAAABJRU5ErkJggg==`;
1292
+ var icons = {
1293
+ pdf,
1294
+ ppt,
1295
+ excel,
1296
+ doc,
1297
+ others,
1298
+ };
1299
+
1300
+ const CLOUND_PRE = "/cloudStorage/read";
1301
+ const _sfc_main = {
1302
+ name: "BmUpload",
1303
+ components: { PlusOutlined: PlusOutlined$1, OverTooltips, UploadOutlined: UploadOutlined$1 },
1304
+ props: {
1305
+ uploadProps: {
1306
+ type: Object,
1307
+ default: () => {
1308
+ return {};
1309
+ }
1310
+ },
1311
+ extraProps: {
1312
+ type: Object,
1313
+ default: () => {
1314
+ return {};
1315
+ }
1316
+ },
1317
+ defaultList: {
1318
+ type: Array,
1319
+ default: () => []
1320
+ },
1321
+ uploadRequest: {
1322
+ type: Function,
1323
+ default() {
1324
+ return () => {
1325
+ };
1326
+ }
1327
+ },
1328
+ cloudReadUrl: {
1329
+ type: String,
1330
+ default: ""
1331
+ }
1332
+ },
1333
+ emits: [
1334
+ "success",
1335
+ "delete",
1336
+ "update",
1337
+ "previewFile",
1338
+ "successFile",
1339
+ "deleteFile",
1340
+ "error"
1341
+ ],
1342
+ setup(props, { emit }) {
1343
+ let acceptList = [
1344
+ ".xlsx",
1345
+ ".pdf",
1346
+ ".doc",
1347
+ ".docx",
1348
+ ".jpg",
1349
+ ".jpeg",
1350
+ ".JPG",
1351
+ ".png",
1352
+ ".rar",
1353
+ ".zip",
1354
+ ".ppt",
1355
+ ".pptx",
1356
+ ".mp4"
1357
+ ];
1358
+ const state = vue.reactive({
1359
+ uploadBarColor: "#4DA0FF",
1360
+ uploadDisabled: false,
1361
+ uploadedList: [],
1362
+ fileList: {},
1363
+ onepViewImageHover: {},
1364
+ previewVisible: false,
1365
+ onepViewImage: "",
1366
+ extraConfigs: {
1367
+ maxSize: 5,
1368
+ maxCount: 5,
1369
+ isAllowDownloadFieldProps: false,
1370
+ hideDisabledBtn: true,
1371
+ tips: "",
1372
+ showTips: true,
1373
+ btnClass: "",
1374
+ picClass: "",
1375
+ alignCenter: false,
1376
+ canNotViewAccept: ".rar,.zip",
1377
+ fileDetail: true,
1378
+ myBtn: false
1379
+ },
1380
+ uploadConfigs: {
1381
+ multiple: false,
1382
+ showUploadList: false,
1383
+ showSlotList: false,
1384
+ listType: "text",
1385
+ text: "",
1386
+ accept: acceptList.join(","),
1387
+ data: {},
1388
+ name: "file",
1389
+ disabled: false,
1390
+ async customRequest({ file, fileField, data }) {
1391
+ if (file.size > state.extraConfigs.maxSize * 1024 * 1024) {
1392
+ return methods.uploadError(new Error(`\u4E0D\u80FD\u4E0A\u4F20\u5927\u4E8E${state.extraConfigs.maxSize}M\u7684\u6587\u4EF6`));
1393
+ }
1394
+ if (Object.keys(state.fileList).length >= state.extraConfigs.maxCount) {
1395
+ return methods.uploadError(new Error(`\u4E0D\u80FD\u4E0A\u4F20\u591A\u4E8E${state.extraConfigs.maxCount}\u4E2A\u6587\u4EF6`));
1396
+ }
1397
+ let name = file.name;
1398
+ let fileFormat = name.split(".").pop();
1399
+ if (!state.uploadConfigs.accept.includes(`.${fileFormat}`)) {
1400
+ return methods.uploadError(new Error(`\u4E0D\u80FD\u4E0A\u4F20\u8BE5\u7C7B\u578B\u6587\u4EF6`));
1401
+ }
1402
+ state.fileList[file.uid] = {
1403
+ uid: file.uid,
1404
+ name: file.name,
1405
+ type: fileFormat,
1406
+ progress: 0,
1407
+ file,
1408
+ isDoneDeloy: false,
1409
+ status: ""
1410
+ };
1411
+ setTimeout(function() {
1412
+ state.fileList[file.uid].isDoneDeloy = true;
1413
+ }, 1e3);
1414
+ methods.customUploadRequest(file);
1415
+ }
1416
+ }
1417
+ });
1418
+ const methods = {
1419
+ customUploadRequest(file) {
1420
+ props.uploadRequest?.(file, {
1421
+ onUploadProgress: (e) => {
1422
+ let progress = Math.round(e.loaded / e.total * 100);
1423
+ state.fileList[file.uid] = {
1424
+ ...state.fileList[file.uid],
1425
+ progress
1426
+ };
1427
+ }
1428
+ }).then(function(data) {
1429
+ state.fileList[file.uid].progress = 100;
1430
+ methods.uploadSuccess(data, file);
1431
+ }).catch(function(error) {
1432
+ console.error(error);
1433
+ if (state.uploadConfigs.listType === "text") {
1434
+ state.fileList[file.uid].progress = 100;
1435
+ }
1436
+ methods.uploadError(error, file);
1437
+ });
1438
+ },
1439
+ uploadSuccess(data, file) {
1440
+ emit("successFile", data);
1441
+ let uri = data?.url;
1442
+ let item = state.extraConfigs.fileDetail ? {
1443
+ name: file.name,
1444
+ size: file.size,
1445
+ type: file.type,
1446
+ url: uri
1447
+ } : uri;
1448
+ state.uploadedList.push(item);
1449
+ state.fileList[file.uid].url = uri;
1450
+ emit("success", state.uploadedList);
1451
+ emit("update", state.uploadedList);
1452
+ },
1453
+ uploadError(error, file = {}) {
1454
+ if (file.uid && state.fileList[file.uid]) {
1455
+ state.fileList[file.uid].status = "error";
1456
+ }
1457
+ emit("error", error);
1458
+ },
1459
+ async deleteFile(uid) {
1460
+ const index = state.uploadedList.findIndex((ele) => state.extraConfigs.fileDetail ? ele === state.fileList[uid].url : ele.url === state.fileList[uid].url);
1461
+ emit("deleteFile", state.fileList[uid]);
1462
+ state.uploadedList.splice(index, 1);
1463
+ delete state.fileList[uid];
1464
+ emit("delete", state.uploadedList);
1465
+ emit("update", state.uploadedList);
1466
+ },
1467
+ pictureHoverEnter(uid) {
1468
+ state.onepViewImageHover[uid] = true;
1469
+ },
1470
+ pictureHoverLeave(uid) {
1471
+ state.onepViewImageHover[uid] = false;
1472
+ },
1473
+ viewOnePicture(item) {
1474
+ if (["img", "image", "png", "jpg", "jpeg"].includes(item.type.toLowerCase())) {
1475
+ state.previewVisible = true;
1476
+ state.onepViewImage = item;
1477
+ return;
1478
+ }
1479
+ emit("previewFile", item);
1480
+ },
1481
+ handleClosePictureView() {
1482
+ state.previewVisible = false;
1483
+ },
1484
+ reUpload(e, uid) {
1485
+ e.stopPropagation();
1486
+ let file = state.fileList[uid].file;
1487
+ state.onepViewImageHover[uid] = false;
1488
+ delete state.fileList[uid];
1489
+ state.uploadConfigs.customRequest({
1490
+ file,
1491
+ fileField: state.uploadConfigs.name,
1492
+ data: state.uploadConfigs.data
1493
+ });
1494
+ },
1495
+ paste(event) {
1496
+ const items = event?.clipboardData?.items;
1497
+ let file = null;
1498
+ if (items && items.length) {
1499
+ for (var i = 0; i < items.length; i++) {
1500
+ if (items[i].type.match("^image/")) {
1501
+ file = items[i].getAsFile();
1502
+ break;
1503
+ }
1504
+ }
1505
+ }
1506
+ if (file) {
1507
+ let uid = utils.getuid();
1508
+ let filename = file.name;
1509
+ let fileInfo = filename?.split(".");
1510
+ if (fileInfo && fileInfo.length > 1) {
1511
+ fileInfo[fileInfo.length - 2] = uid;
1512
+ filename = fileInfo.join(".");
1513
+ } else {
1514
+ filename = uid + ".png";
1515
+ }
1516
+ file = new File([file], filename, { type: file.type });
1517
+ file["uid"] = uid;
1518
+ state.uploadConfigs.customRequest({
1519
+ file,
1520
+ fileField: state.uploadConfigs.name,
1521
+ data: state.uploadConfigs.data
1522
+ });
1523
+ }
1524
+ }
1525
+ };
1526
+ vue.watch(() => props.defaultList, function(list) {
1527
+ if (list.length) {
1528
+ list.forEach(function(item) {
1529
+ let uid = utils.getuid();
1530
+ if (!item.url.includes("http") && !item.url.includes(CLOUND_PRE))
1531
+ item.url = props.cloudReadUrl + item.url;
1532
+ state.fileList[uid] = {
1533
+ uid,
1534
+ name: item.name,
1535
+ url: item.url,
1536
+ type: item.type || "png",
1537
+ progress: 100,
1538
+ isDoneDeloy: true
1539
+ };
1540
+ state.uploadedList.push(item);
1541
+ });
1542
+ }
1543
+ }, {
1544
+ immediate: true
1545
+ });
1546
+ vue.watch([() => props.uploadProps, () => props.extraProps], function([config, extra]) {
1547
+ state.uploadConfigs = {
1548
+ ...state.uploadConfigs,
1549
+ ...config,
1550
+ showUploadList: false
1551
+ };
1552
+ state.extraConfigs = {
1553
+ ...state.extraConfigs,
1554
+ ...extra
1555
+ };
1556
+ }, {
1557
+ immediate: true,
1558
+ deep: true
1559
+ });
1560
+ const uploadDisabled = vue.computed(() => {
1561
+ if (Object.keys(state.fileList).length >= state.extraConfigs.maxCount) {
1562
+ return true;
1563
+ }
1564
+ return false;
1565
+ });
1566
+ vue.watchEffect(() => {
1567
+ state.uploadConfigs.disabled = uploadDisabled.value;
1568
+ });
1569
+ return {
1570
+ ...vue.toRefs(state),
1571
+ icons,
1572
+ ...methods,
1573
+ uploadDisabled
1574
+ };
1575
+ }
1576
+ };
1577
+ const _hoisted_1 = {
1578
+ key: 0,
1579
+ class: "bm-upload__picture-progress"
1580
+ };
1581
+ const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__picture-progress__text" }, "\u56FE\u7247\u4E0A\u4F20\u4E2D", -1);
1582
+ const _hoisted_3 = ["onMouseenter", "onMouseleave"];
1583
+ const _hoisted_4 = ["src"];
1584
+ const _hoisted_5 = ["src"];
1585
+ const _hoisted_6 = ["src"];
1586
+ const _hoisted_7 = ["src"];
1587
+ const _hoisted_8 = ["src"];
1588
+ const _hoisted_9 = ["src"];
1589
+ const _hoisted_10 = {
1590
+ key: 6,
1591
+ class: "bm-upload__picture-result__cover"
1592
+ };
1593
+ const _hoisted_11 = ["onClick"];
1594
+ const _hoisted_12 = ["onClick"];
1595
+ const _hoisted_13 = ["onMouseenter", "onMouseleave"];
1596
+ const _hoisted_14 = /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__picture-error__image" }, null, -1);
1597
+ const _hoisted_15 = /* @__PURE__ */ vue.createElementVNode("div", null, "\u4E0A\u4F20\u9519\u8BEF", -1);
1598
+ const _hoisted_16 = {
1599
+ key: 0,
1600
+ class: "bm-upload__picture-result__cover"
1601
+ };
1602
+ const _hoisted_17 = ["onClick"];
1603
+ const _hoisted_18 = ["onClick"];
1604
+ const _hoisted_19 = {
1605
+ key: 0,
1606
+ style: { "font-size": "24px", "color": "#9393a3" }
1607
+ };
1608
+ const _hoisted_20 = { class: "ant-upload-text bm-upload__text" };
1609
+ const _hoisted_21 = {
1610
+ key: 0,
1611
+ class: "bm-upload__tips"
1612
+ };
1613
+ const _hoisted_22 = { key: 1 };
1614
+ const _hoisted_23 = {
1615
+ key: 0,
1616
+ class: "bm-upload__tips"
1617
+ };
1618
+ const _hoisted_24 = {
1619
+ key: 2,
1620
+ class: "bm-upload__file-list"
1621
+ };
1622
+ const _hoisted_25 = { class: "bm-upload__file__detail" };
1623
+ const _hoisted_26 = /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__file__icon" }, [
1624
+ /* @__PURE__ */ vue.createElementVNode("div", { class: "bm-upload__attachment" })
1625
+ ], -1);
1626
+ const _hoisted_27 = { class: "bm-upload__file__name" };
1627
+ const _hoisted_28 = { class: "bm-upload__file__progress-tools" };
1628
+ const _hoisted_29 = ["onClick"];
1629
+ const _hoisted_30 = ["onClick"];
1630
+ const _hoisted_31 = {
1631
+ key: 0,
1632
+ class: "bm-upload__progress"
1633
+ };
1634
+ const _hoisted_32 = { style: { "padding-top": "20px" } };
1635
+ const _hoisted_33 = ["src"];
1636
+ const _hoisted_34 = ["title", "src"];
1637
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1638
+ const _component_a_progress = vue.resolveComponent("a-progress");
1639
+ const _component_PlusOutlined = vue.resolveComponent("PlusOutlined");
1640
+ const _component_UploadOutlined = vue.resolveComponent("UploadOutlined");
1641
+ const _component_a_button = vue.resolveComponent("a-button");
1642
+ const _component_a_upload = vue.resolveComponent("a-upload");
1643
+ const _component_OverTooltips = vue.resolveComponent("OverTooltips");
1644
+ const _component_a_modal = vue.resolveComponent("a-modal");
1645
+ return vue.openBlock(), vue.createElementBlock("div", {
1646
+ class: vue.normalizeClass(["bm-upload", {
1647
+ "bm-upload--text": _ctx.uploadConfigs.listType === "text"
1648
+ }])
1649
+ }, [
1650
+ _ctx.uploadConfigs.listType === "picture-card" ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.fileList, (item) => {
1651
+ return vue.openBlock(), vue.createElementBlock("div", {
1652
+ key: item,
1653
+ class: vue.normalizeClass(["bm-upload__picture", { "bm-upload__picture--error": item.status === "error" }])
1654
+ }, [
1655
+ vue.createCommentVNode(" \u4E0A\u4F20\u4E2D "),
1656
+ item.progress < 100 && item.status !== "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
1657
+ _hoisted_2,
1658
+ vue.createVNode(_component_a_progress, {
1659
+ type: "line",
1660
+ "stroke-width": 2,
1661
+ "show-info": false,
1662
+ "stroke-color": _ctx.uploadBarColor,
1663
+ percent: item.uid?.progress
1664
+ }, null, 8, ["stroke-color", "percent"])
1665
+ ])) : vue.createCommentVNode("v-if", true),
1666
+ vue.createCommentVNode(" \u56FE\u7247\u5C55\u793A "),
1667
+ item.progress >= 100 && item.status !== "error" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1668
+ !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock("div", {
1669
+ key: 0,
1670
+ class: "bm-upload__picture-result",
1671
+ onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
1672
+ onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
1673
+ onClick: _cache[0] || (_cache[0] = (e) => e.stopPropagation())
1674
+ }, [
1675
+ item.type === "pdf" ? (vue.openBlock(), vue.createElementBlock("img", {
1676
+ key: 0,
1677
+ class: "bm-upload__picture-result__image",
1678
+ src: $setup.icons.pdf,
1679
+ alt: "avatar"
1680
+ }, null, 8, _hoisted_4)) : item.type === "xlsx" ? (vue.openBlock(), vue.createElementBlock("img", {
1681
+ key: 1,
1682
+ class: "bm-upload__picture-result__image",
1683
+ src: $setup.icons.excel,
1684
+ alt: "avatar"
1685
+ }, null, 8, _hoisted_5)) : item.type === "ppt" ? (vue.openBlock(), vue.createElementBlock("img", {
1686
+ key: 2,
1687
+ class: "bm-upload__picture-result__image",
1688
+ src: $setup.icons.ppt,
1689
+ alt: "avatar"
1690
+ }, null, 8, _hoisted_6)) : ["docx", "doc"].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1691
+ key: 3,
1692
+ class: "bm-upload__picture-result__image",
1693
+ src: $setup.icons.doc,
1694
+ alt: "avatar"
1695
+ }, null, 8, _hoisted_7)) : ["img", "image", "png", "jpg", "jpeg"].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1696
+ key: 4,
1697
+ class: "bm-upload__picture-result__image",
1698
+ src: item.url,
1699
+ alt: "avatar"
1700
+ }, null, 8, _hoisted_8)) : (vue.openBlock(), vue.createElementBlock("img", {
1701
+ key: 5,
1702
+ class: "bm-upload__picture-result__image",
1703
+ src: $setup.icons.others,
1704
+ alt: "avatar"
1705
+ }, null, 8, _hoisted_9)),
1706
+ _ctx.onepViewImageHover[item.uid] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
1707
+ !_ctx.extraConfigs.canNotViewAccept?.includes(item?.type) ? (vue.openBlock(), vue.createElementBlock("div", {
1708
+ key: 0,
1709
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--view",
1710
+ onClick: ($event) => _ctx.viewOnePicture(item)
1711
+ }, null, 8, _hoisted_11)) : vue.createCommentVNode("v-if", true),
1712
+ !(_ctx.extraConfigs.hidenDelBtn ?? false) ? (vue.openBlock(), vue.createElementBlock("div", {
1713
+ key: 1,
1714
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--delete",
1715
+ onClick: ($event) => _ctx.deleteFile(item.uid)
1716
+ }, null, 8, _hoisted_12)) : vue.createCommentVNode("v-if", true)
1717
+ ])) : vue.createCommentVNode("v-if", true)
1718
+ ], 40, _hoisted_3)) : vue.renderSlot(_ctx.$slots, "file", {
1719
+ key: 1,
1720
+ file: item
1721
+ })
1722
+ ], 2112)) : vue.createCommentVNode("v-if", true),
1723
+ vue.createCommentVNode(" \u56FE\u7247\u9519\u8BEF\u5C55\u793A "),
1724
+ item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", {
1725
+ key: 2,
1726
+ class: "bm-upload__picture-error",
1727
+ onMouseenter: ($event) => _ctx.pictureHoverEnter(item.uid),
1728
+ onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
1729
+ onClick: _cache[1] || (_cache[1] = (e) => e.stopPropagation())
1730
+ }, [
1731
+ _hoisted_14,
1732
+ _hoisted_15,
1733
+ _ctx.onepViewImageHover[item.uid] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
1734
+ vue.createElementVNode("div", {
1735
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--retry",
1736
+ onClick: (e) => _ctx.reUpload(e, item.uid)
1737
+ }, null, 8, _hoisted_17),
1738
+ vue.createElementVNode("div", {
1739
+ class: "bm-upload__picture-result__icon bm-upload__picture-result__icon--delete",
1740
+ onClick: ($event) => _ctx.deleteFile(item.uid)
1741
+ }, null, 8, _hoisted_18)
1742
+ ])) : vue.createCommentVNode("v-if", true)
1743
+ ], 40, _hoisted_13)) : vue.createCommentVNode("v-if", true)
1744
+ ], 2);
1745
+ }), 128)) : vue.createCommentVNode("v-if", true),
1746
+ !($setup.uploadDisabled && _ctx.extraConfigs?.hideDisabledBtn) ? (vue.openBlock(), vue.createBlock(_component_a_upload, vue.mergeProps({ key: 1 }, _ctx.uploadConfigs, {
1747
+ class: { "bm--upload__custom-button": _ctx.extraConfigs.myBtn }
1748
+ }), {
1749
+ default: vue.withCtx(() => [
1750
+ _ctx.extraConfigs.myBtn ? vue.renderSlot(_ctx.$slots, "myBtn", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1751
+ _ctx.uploadConfigs.listType === "picture-card" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
1752
+ vue.createVNode(_component_PlusOutlined),
1753
+ vue.createElementVNode("div", _hoisted_20, vue.toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u56FE\u7247"), 1),
1754
+ _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_21, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
1755
+ ])) : _ctx.uploadConfigs.listType === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22, [
1756
+ vue.createVNode(_component_a_button, {
1757
+ class: vue.normalizeClass(_ctx.extraConfigs.btnClass),
1758
+ disabled: $setup.uploadDisabled && !_ctx.extraConfigs?.hideDisabledBtn
1759
+ }, {
1760
+ default: vue.withCtx(() => [
1761
+ vue.createVNode(_component_UploadOutlined),
1762
+ vue.createTextVNode(" " + vue.toDisplayString(_ctx.uploadConfigs.text || "\u4E0A\u4F20\u6587\u4EF6"), 1)
1763
+ ]),
1764
+ _: 1
1765
+ }, 8, ["class", "disabled"]),
1766
+ _ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_23, vue.toDisplayString(_ctx.extraConfigs.tips), 1)) : vue.createCommentVNode("v-if", true)
1767
+ ])) : vue.createCommentVNode("v-if", true)
1768
+ ], 2112))
1769
+ ]),
1770
+ _: 3
1771
+ }, 16, ["class"])) : vue.createCommentVNode("v-if", true),
1772
+ _ctx.uploadConfigs.listType === "text" && !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_24, [
1773
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.fileList, (item) => {
1774
+ return vue.openBlock(), vue.createElementBlock("div", {
1775
+ key: item,
1776
+ class: "bm-upload__file"
1777
+ }, [
1778
+ !_ctx.uploadConfigs.showSlotList ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
1779
+ vue.createElementVNode("div", _hoisted_25, [
1780
+ _hoisted_26,
1781
+ vue.createElementVNode("div", _hoisted_27, [
1782
+ vue.createVNode(_component_OverTooltips, {
1783
+ title: item.name
1784
+ }, null, 8, ["title"])
1785
+ ]),
1786
+ vue.createElementVNode("div", _hoisted_28, [
1787
+ item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", {
1788
+ key: 0,
1789
+ class: "bm-upload__error-reload",
1790
+ onClick: (e) => _ctx.reUpload(e, item.uid)
1791
+ }, null, 8, _hoisted_29)) : vue.createCommentVNode("v-if", true),
1792
+ vue.createElementVNode("div", {
1793
+ class: "bm-upload__trash",
1794
+ onClick: ($event) => _ctx.deleteFile(item.uid)
1795
+ }, null, 8, _hoisted_30)
1796
+ ])
1797
+ ]),
1798
+ !item.isDoneDeloy || item.progress < 100 || item.status === "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_31, [
1799
+ vue.createVNode(_component_a_progress, {
1800
+ type: "line",
1801
+ "stroke-width": 2,
1802
+ "show-info": false,
1803
+ "stroke-color": item.status !== "error" ? _ctx.uploadBarColor : "#E64C2E",
1804
+ percent: item.progress
1805
+ }, null, 8, ["stroke-color", "percent"])
1806
+ ])) : vue.createCommentVNode("v-if", true)
1807
+ ], 64)) : vue.renderSlot(_ctx.$slots, "file", {
1808
+ key: 1,
1809
+ file: item
1810
+ })
1811
+ ]);
1812
+ }), 128))
1813
+ ])) : vue.createCommentVNode("v-if", true),
1814
+ vue.createVNode(_component_a_modal, {
1815
+ visible: _ctx.previewVisible,
1816
+ width: _ctx.onepViewImage.type === "pdf" ? "1200px" : "600px",
1817
+ footer: null,
1818
+ onCancel: _ctx.handleClosePictureView
1819
+ }, {
1820
+ default: vue.withCtx(() => [
1821
+ vue.createElementVNode("div", _hoisted_32, [
1822
+ ["img", "image", "png", "jpg", "jpeg"].includes(_ctx.onepViewImage.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1823
+ key: 0,
1824
+ style: { "width": "100%" },
1825
+ src: _ctx.onepViewImage.url,
1826
+ alt: ""
1827
+ }, null, 8, _hoisted_33)) : (vue.openBlock(), vue.createElementBlock("iframe", {
1828
+ key: 1,
1829
+ title: _ctx.onepViewImage.type,
1830
+ style: { "width": "100%", "min-height": "600px" },
1831
+ src: _ctx.onepViewImage.url
1832
+ }, null, 8, _hoisted_34))
1833
+ ])
1834
+ ]),
1835
+ _: 1
1836
+ }, 8, ["visible", "width", "onCancel"])
1837
+ ], 2);
1838
+ }
1839
+ var Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "upload.vue"]]);
1840
+
1841
+ const BmUpload = withInstall.withInstall(Upload);
1842
+
1843
+ exports.BmUpload = BmUpload;
1844
+ exports["default"] = BmUpload;