xt-element-ui 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/lib/css/2.3f7aa432.css +1 -0
  2. package/lib/css/3.ffcc175d.css +1 -0
  3. package/lib/css/4.9abd1f2b.css +1 -0
  4. package/lib/css/5.1a31ed8a.css +1 -0
  5. package/lib/css/6.c2d0d77e.css +1 -0
  6. package/lib/index.common.0.js +120208 -0
  7. package/lib/index.common.2.js +1053 -0
  8. package/lib/index.common.3.js +996 -0
  9. package/lib/index.common.4.js +1108 -0
  10. package/lib/index.common.5.js +1009 -0
  11. package/lib/index.common.6.js +973 -0
  12. package/lib/index.common.js +8003 -211
  13. package/lib/index.css +1 -1
  14. package/lib/index.umd.0.js +120208 -0
  15. package/lib/index.umd.2.js +1053 -0
  16. package/lib/index.umd.3.js +996 -0
  17. package/lib/index.umd.4.js +1108 -0
  18. package/lib/index.umd.5.js +1009 -0
  19. package/lib/index.umd.6.js +973 -0
  20. package/lib/index.umd.js +8003 -211
  21. package/lib/index.umd.min.0.js +34 -0
  22. package/lib/index.umd.min.2.js +1 -0
  23. package/lib/index.umd.min.3.js +1 -0
  24. package/lib/index.umd.min.4.js +1 -0
  25. package/lib/index.umd.min.5.js +1 -0
  26. package/lib/index.umd.min.6.js +1 -0
  27. package/lib/index.umd.min.js +1 -1
  28. package/package.json +6 -2
  29. package/src/components/button/index.vue +5 -5
  30. package/src/components/button/style/index.scss +743 -90
  31. package/src/components/chart/ExBar.vue +203 -0
  32. package/src/components/chart/ExLine.vue +146 -0
  33. package/src/components/chart/ExMulti.vue +257 -0
  34. package/src/components/chart/ExPie.vue +159 -0
  35. package/src/components/chart/ExTrend.vue +121 -0
  36. package/src/components/chart/index.js +2 -0
  37. package/src/components/chart/index.vue +51 -0
  38. package/src/components/chart/pieList.vue +110 -0
  39. package/src/components/chart/theme/blue.js +91 -0
  40. package/src/components/chart/theme/dark.js +91 -0
  41. package/src/components/chart/theme/orange.js +92 -0
  42. package/src/components/chart/theme/starry.js +106 -0
  43. package/src/components/chart/theme/white.js +110 -0
  44. package/src/components/chart/utils.js +273 -0
  45. package/src/components/config-provider/index.vue +150 -51
  46. package/src/components/config-provider/style/index.scss +2 -2
  47. package/src/components/date-picker/SearchDate.vue +45 -0
  48. package/src/components/date-picker/index.js +2 -0
  49. package/src/components/date-picker/index.vue +131 -0
  50. package/src/components/date-picker/quarter.vue +152 -0
  51. package/src/components/grid-box/index.js +2 -0
  52. package/src/components/grid-box/index.vue +42 -0
  53. package/src/components/layout/BaseCollapse.vue +48 -0
  54. package/src/components/layout/ExFieldset.vue +204 -0
  55. package/src/components/page/index.js +0 -0
  56. package/src/components/page/index.vue +109 -0
  57. package/src/components/select-tree/index.js +0 -0
  58. package/src/components/select-tree/index.vue +386 -0
  59. package/src/components/table/ExCell.vue +27 -0
  60. package/src/components/table/ExColumn.vue +36 -0
  61. package/src/components/table/index.js +2 -0
  62. package/src/components/table/index.vue +731 -0
  63. package/src/components/table/processor.js +380 -0
  64. package/src/components/text/index.vue +79 -2
  65. package/src/components/text/style/index.scss +28 -6
  66. package/src/components/upload/index.js +2 -0
  67. package/src/components/upload/index.vue +225 -0
  68. package/src/components/upload/preview.vue +333 -0
  69. package/src/index.js +11 -2
  70. package/src/styles/css-variables.scss +238 -148
  71. package/src/styles/theme/background.scss +1 -1
  72. package/src/styles/theme/colors.scss +90 -1
  73. package/src/styles/variables.scss +1 -1
  74. package/src/components/button/style/index copy.scss +0 -221
@@ -0,0 +1,1053 @@
1
+ ((typeof self !== 'undefined' ? self : this)["webpackJsonpxt_element_ui"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpxt_element_ui"] || []).push([[2],{
2
+
3
+ /***/ "0f70":
4
+ /***/ (function(module, exports, __webpack_require__) {
5
+
6
+ // extracted by mini-css-extract-plugin
7
+
8
+ /***/ }),
9
+
10
+ /***/ "202d":
11
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
12
+
13
+ "use strict";
14
+
15
+ // UNUSED EXPORTS: echarts
16
+
17
+ // EXTERNAL MODULE: ./node_modules/echarts/index.js + 575 modules
18
+ var echarts = __webpack_require__("313e");
19
+
20
+ // CONCATENATED MODULE: ./src/components/chart/theme/white.js
21
+ /* harmony default export */ var white = ({
22
+ color: ["#1890ff", "#37c3a4", "#29c0ce", "#6480D7", "#8cce6f", "#3a5dca", "#ffb74d"],
23
+ backgroundColor: "#ffffff",
24
+ textStyle: {
25
+ fontFamily: "Microsoft YaHei, sans-serif"
26
+ },
27
+ title: {
28
+ textStyle: {
29
+ color: "#333",
30
+ fontSize: 16
31
+ },
32
+ subtextStyle: {
33
+ color: "#666666",
34
+ fontSize: 12
35
+ }
36
+ },
37
+ line: {
38
+ itemStyle: {
39
+ },
40
+ lineStyle: {
41
+ width: 2
42
+ }
43
+ },
44
+ bar: {
45
+ itemStyle: {
46
+ borderRadius: 4
47
+ }
48
+ },
49
+ pie: {
50
+ roseType: "radius",
51
+ label: {
52
+ color: "#333"
53
+ }
54
+ },
55
+ radar: {
56
+ indicator: {
57
+ color: "#666666"
58
+ }
59
+ },
60
+ map: {
61
+ label: {
62
+ color: "#333"
63
+ },
64
+ itemStyle: {
65
+ borderColor: "#fff"
66
+ }
67
+ },
68
+ gauge: {
69
+ axisLine: {
70
+ lineStyle: {
71
+ color: [[1, "#5470c6"]]
72
+ }
73
+ }
74
+ },
75
+ toolbox: {
76
+ iconStyle: {
77
+ borderColor: "#666666"
78
+ }
79
+ },
80
+ xAxis: {
81
+ axisLine: {
82
+ lineStyle: {
83
+ color: "#DFE9EE"
84
+ }
85
+ },
86
+ axisTick: {
87
+ lineStyle: {
88
+ color: "#DFE9EE"
89
+ },
90
+ show: false
91
+ }
92
+ },
93
+ yAxis: {
94
+ axisLine: {
95
+ lineStyle: {
96
+ color: "#DFE9EE"
97
+ }
98
+ },
99
+ axisTick: {
100
+ lineStyle: {
101
+ color: "#DFE9EE"
102
+ }
103
+ },
104
+ splitLine: {
105
+ show: true,
106
+ lineStyle: {
107
+ type: "dashed",
108
+ color: "#DFE9EE"
109
+ }
110
+ }
111
+ },
112
+ splitArea: {
113
+ areaStyle: {
114
+ color: ["#f7f8fa", "#ffffff"]
115
+ }
116
+ },
117
+ legend: {
118
+ textStyle: {
119
+ color: "#333333"
120
+ }
121
+ },
122
+ tooltip: {
123
+ borderWidth: 1,
124
+ backgroundColor: "#ffffff",
125
+ textStyle: {
126
+ color: "#333333"
127
+ },
128
+ trigger: "axis"
129
+ }
130
+ });
131
+
132
+ // CONCATENATED MODULE: ./src/components/chart/theme/dark.js
133
+ /* harmony default export */ var dark = ({
134
+ color: ["#0de7ff", "#a782ff", "#fcdd60", "#0de7ff", "#ffc5a1", "#6291ae", "#13ce66"],
135
+ backgroundColor: "#ffffff",
136
+ textStyle: {
137
+ fontFamily: "Microsoft YaHei, sans-serif"
138
+ },
139
+ title: {
140
+ textStyle: {
141
+ color: "#333"
142
+ },
143
+ subtextStyle: {
144
+ color: "#666666"
145
+ }
146
+ },
147
+ line: {
148
+ itemStyle: {
149
+ },
150
+ lineStyle: {
151
+ width: 2
152
+ }
153
+ },
154
+ bar: {
155
+ itemStyle: {
156
+ borderRadius: 4
157
+ }
158
+ },
159
+ pie: {
160
+ roseType: "radius",
161
+ label: {
162
+ color: "#333"
163
+ }
164
+ },
165
+ radar: {
166
+ indicator: {
167
+ color: "#666666"
168
+ }
169
+ },
170
+ map: {
171
+ label: {
172
+ color: "#333"
173
+ },
174
+ itemStyle: {
175
+ borderColor: "#fff"
176
+ }
177
+ },
178
+ gauge: {
179
+ axisLine: {
180
+ lineStyle: {
181
+ color: [[1, "#5470c6"]]
182
+ }
183
+ }
184
+ },
185
+ toolbox: {
186
+ iconStyle: {
187
+ borderColor: "#666666"
188
+ }
189
+ },
190
+ axisLine: {
191
+ lineStyle: {
192
+ color: "#DCDFE6"
193
+ }
194
+ },
195
+ axisTick: {
196
+ lineStyle: {
197
+ color: "#DCDFE6"
198
+ }
199
+ },
200
+ splitLine: {
201
+ lineStyle: {
202
+ color: "#ebeef5"
203
+ }
204
+ },
205
+ splitArea: {
206
+ areaStyle: {
207
+ color: ["#f7f8fa", "#ffffff"]
208
+ }
209
+ },
210
+ legend: {
211
+ textStyle: {
212
+ color: "#666"
213
+ }
214
+ },
215
+ tooltip: {
216
+ backgroundColor: "rgba(255, 255, 255, 0.95)",
217
+ borderColor: "#DCDFE6",
218
+ borderWidth: 1,
219
+ textStyle: {
220
+ color: "#333"
221
+ }
222
+ }
223
+ });
224
+
225
+ // CONCATENATED MODULE: ./src/components/chart/theme/blue.js
226
+ /* harmony default export */ var blue = ({
227
+ color: ["#2CDEB3", "#A17EE6", "#E57E40", "#409EFF"],
228
+ backgroundColor: "#ffffff",
229
+ textStyle: {
230
+ fontFamily: "Microsoft YaHei, sans-serif"
231
+ },
232
+ title: {
233
+ textStyle: {
234
+ color: "#333"
235
+ },
236
+ subtextStyle: {
237
+ color: "#666666"
238
+ }
239
+ },
240
+ line: {
241
+ itemStyle: {
242
+ },
243
+ lineStyle: {
244
+ width: 2
245
+ }
246
+ },
247
+ bar: {
248
+ itemStyle: {
249
+ borderRadius: 4
250
+ }
251
+ },
252
+ pie: {
253
+ roseType: "radius",
254
+ label: {
255
+ color: "#333"
256
+ }
257
+ },
258
+ radar: {
259
+ indicator: {
260
+ color: "#666666"
261
+ }
262
+ },
263
+ map: {
264
+ label: {
265
+ color: "#333"
266
+ },
267
+ itemStyle: {
268
+ borderColor: "#fff"
269
+ }
270
+ },
271
+ gauge: {
272
+ axisLine: {
273
+ lineStyle: {
274
+ color: [[1, "#5470c6"]]
275
+ }
276
+ }
277
+ },
278
+ toolbox: {
279
+ iconStyle: {
280
+ borderColor: "#666666"
281
+ }
282
+ },
283
+ axisLine: {
284
+ lineStyle: {
285
+ color: "#DCDFE6"
286
+ }
287
+ },
288
+ axisTick: {
289
+ lineStyle: {
290
+ color: "#DCDFE6"
291
+ }
292
+ },
293
+ splitLine: {
294
+ lineStyle: {
295
+ color: "#ebeef5"
296
+ }
297
+ },
298
+ splitArea: {
299
+ areaStyle: {
300
+ color: ["#f7f8fa", "#ffffff"]
301
+ }
302
+ },
303
+ legend: {
304
+ textStyle: {
305
+ color: "#666"
306
+ }
307
+ },
308
+ tooltip: {
309
+ backgroundColor: "rgba(255, 255, 255, 0.95)",
310
+ borderColor: "#DCDFE6",
311
+ borderWidth: 1,
312
+ textStyle: {
313
+ color: "#333"
314
+ }
315
+ }
316
+ });
317
+
318
+ // CONCATENATED MODULE: ./src/components/chart/theme/starry.js
319
+ /* harmony default export */ var starry = ({
320
+ color: [
321
+ "#1685a9", // 石青
322
+ "#21a675", // 松柏绿
323
+ "#1bd1a5", // 飞燕草蓝
324
+ "#8c4356", // 绛紫
325
+ "#0dafc6", // 孔雀蓝
326
+ "#4b5cc4", // 宝蓝
327
+ "#758a99", // 墨灰
328
+ "#cca4e3", // 丁香色
329
+ "#205277", // 靛青色
330
+ "#d9b611", // 秋香色
331
+ "#ff8c31", // 杏红
332
+ "#9d2933", // 胭脂
333
+ "#0288c5", // 浅靛青蓝
334
+ "#44cef6" // 天蓝色
335
+ ],
336
+ backgroundColor: "#ffffff",
337
+ textStyle: {
338
+ fontFamily: "Microsoft YaHei, sans-serif"
339
+ },
340
+ title: {
341
+ textStyle: {
342
+ color: "#333"
343
+ },
344
+ subtextStyle: {
345
+ color: "#666666"
346
+ }
347
+ },
348
+ line: {
349
+ itemStyle: {
350
+ },
351
+ lineStyle: {
352
+ width: 2
353
+ }
354
+ },
355
+ bar: {
356
+ itemStyle: {
357
+ borderRadius: 4
358
+ }
359
+ },
360
+ pie: {
361
+ roseType: "radius",
362
+ label: {
363
+ color: "#333"
364
+ }
365
+ },
366
+ radar: {
367
+ indicator: {
368
+ color: "#666666"
369
+ }
370
+ },
371
+ map: {
372
+ label: {
373
+ color: "#333"
374
+ },
375
+ itemStyle: {
376
+ borderColor: "#fff"
377
+ }
378
+ },
379
+ gauge: {
380
+ axisLine: {
381
+ lineStyle: {
382
+ color: [[1, "#5470c6"]]
383
+ }
384
+ }
385
+ },
386
+ toolbox: {
387
+ iconStyle: {
388
+ borderColor: "#666666"
389
+ }
390
+ },
391
+ axisLine: {
392
+ lineStyle: {
393
+ color: "#DCDFE6"
394
+ }
395
+ },
396
+ axisTick: {
397
+ lineStyle: {
398
+ color: "#DCDFE6"
399
+ }
400
+ },
401
+ splitLine: {
402
+ lineStyle: {
403
+ color: "#ebeef5"
404
+ }
405
+ },
406
+ splitArea: {
407
+ areaStyle: {
408
+ color: ["#f7f8fa", "#ffffff"]
409
+ }
410
+ },
411
+ legend: {
412
+ textStyle: {
413
+ color: "#666"
414
+ }
415
+ },
416
+ tooltip: {
417
+ backgroundColor: "rgba(255, 255, 255, 0.95)",
418
+ borderColor: "#DCDFE6",
419
+ borderWidth: 1,
420
+ textStyle: {
421
+ color: "#333"
422
+ }
423
+ }
424
+ });
425
+
426
+ // CONCATENATED MODULE: ./src/components/chart/theme/orange.js
427
+ /* harmony default export */ var orange = ({
428
+ color: ["#e69419", "#A5b4da", "#F8792C", "#97bfb4", "#de747b", "#d6bac0", "#e62737", "#f35969", "#f1ccb0", "#b7394e", "#fe9c1c2"],
429
+ backgroundColor: "#ffffff",
430
+ textStyle: {
431
+ fontFamily: "Microsoft YaHei, sans-serif"
432
+ },
433
+ title: {
434
+ textStyle: {
435
+ color: "#333"
436
+ },
437
+ subtextStyle: {
438
+ color: "#666666"
439
+ }
440
+ },
441
+ line: {
442
+ itemStyle: {
443
+ color: "#e69419"
444
+ },
445
+ lineStyle: {
446
+ width: 2
447
+ }
448
+ },
449
+ bar: {
450
+ itemStyle: {
451
+ borderRadius: 4
452
+ }
453
+ },
454
+ pie: {
455
+ roseType: "radius",
456
+ label: {
457
+ color: "#333"
458
+ }
459
+ },
460
+ radar: {
461
+ indicator: {
462
+ color: "#666666"
463
+ }
464
+ },
465
+ map: {
466
+ label: {
467
+ color: "#333"
468
+ },
469
+ itemStyle: {
470
+ borderColor: "#fff"
471
+ }
472
+ },
473
+ gauge: {
474
+ axisLine: {
475
+ lineStyle: {
476
+ color: [[1, "#5470c6"]]
477
+ }
478
+ }
479
+ },
480
+ toolbox: {
481
+ iconStyle: {
482
+ borderColor: "#666666"
483
+ }
484
+ },
485
+ axisLine: {
486
+ lineStyle: {
487
+ color: "#DCDFE6"
488
+ }
489
+ },
490
+ axisTick: {
491
+ lineStyle: {
492
+ color: "#DCDFE6"
493
+ }
494
+ },
495
+ splitLine: {
496
+ lineStyle: {
497
+ color: "#ebeef5"
498
+ }
499
+ },
500
+ splitArea: {
501
+ areaStyle: {
502
+ color: ["#f7f8fa", "#ffffff"]
503
+ }
504
+ },
505
+ legend: {
506
+ textStyle: {
507
+ color: "#666"
508
+ }
509
+ },
510
+ tooltip: {
511
+ backgroundColor: "rgba(255, 255, 255, 0.95)",
512
+ borderColor: "#DCDFE6",
513
+ borderWidth: 1,
514
+ textStyle: {
515
+ color: "#333"
516
+ }
517
+ }
518
+ });
519
+
520
+ // CONCATENATED MODULE: ./src/components/chart/utils.js
521
+
522
+
523
+
524
+
525
+
526
+
527
+
528
+
529
+ const themeKeys = {
530
+ "default": white,
531
+ "white": white,
532
+ "dark": dark,
533
+ "blue": blue,
534
+ "starry": starry,
535
+ "orange": orange
536
+ };
537
+
538
+ for (const key in themeKeys) {
539
+ echarts["b" /* registerTheme */](key, themeKeys[key]);
540
+ }
541
+
542
+ // 字体大小配置
543
+ const fontSizeMap = {
544
+ small: {
545
+ title: 14,
546
+ subtitle: 11,
547
+ legend: 11,
548
+ axisLabel: 10,
549
+ tooltip: 11,
550
+ label: 11
551
+ },
552
+ medium: {
553
+ title: 16,
554
+ subtitle: 12,
555
+ legend: 12,
556
+ axisLabel: 12,
557
+ tooltip: 12,
558
+ label: 12
559
+ },
560
+ large: {
561
+ title: 18,
562
+ subtitle: 14,
563
+ legend: 14,
564
+ axisLabel: 14,
565
+ tooltip: 14,
566
+ label: 14
567
+ }
568
+ };
569
+
570
+ function EchartsUtil() {}
571
+
572
+ EchartsUtil.currentTheme = "default";
573
+ EchartsUtil.currentSize = "medium";
574
+ EchartsUtil.inverse = false;
575
+
576
+ EchartsUtil.baseOption = {
577
+ backgroundColor: "transparent",
578
+ tooltip: {
579
+ trigger: "axis",
580
+ borderWidth: 1
581
+ },
582
+ legend: {
583
+ right: 20,
584
+ top: 0,
585
+ show: true,
586
+ textStyle: {
587
+ fontSize: 12
588
+ }
589
+ },
590
+ grid: {
591
+ top: "25%",
592
+ left: "40",
593
+ right: "15",
594
+ bottom: "40"
595
+ },
596
+ xAxis: {
597
+ type: "category",
598
+ boundaryGap: false,
599
+ axisTick: {
600
+ show: true,
601
+ length: 4
602
+ },
603
+ axisLabel: {
604
+ fontSize: 12,
605
+ interval: 0,
606
+ formatter: function(value) {
607
+ return !this.reverse && this.longLable ? value.replace(new RegExp(`(.{${this.longLableSplitNum}})`, "g"), `$1\n`) : value;
608
+ }
609
+ }
610
+ },
611
+ yAxis: {
612
+ type: "value",
613
+ axisTick: {
614
+ show: false
615
+ },
616
+ min: null,
617
+ max: null,
618
+ axisLabel: {
619
+ show: false
620
+ },
621
+ splitLine: {
622
+ lineStyle: {
623
+ type: "dashed",
624
+ width: 1
625
+ }
626
+ }
627
+ }
628
+ };
629
+
630
+ EchartsUtil.chartInstanceList = [];
631
+
632
+ EchartsUtil.mergeOptions = function(themeOption, customOption) {
633
+ return Object.assign({}, this.baseOption, themeOption, customOption);
634
+ };
635
+
636
+ // 根据字体大小调整主题配置
637
+ EchartsUtil.applyFontSize = function(themeOption, size) {
638
+ const fontSizeConfig = fontSizeMap[size] || fontSizeMap.medium;
639
+
640
+ const result = JSON.parse(JSON.stringify(themeOption));
641
+
642
+ // 调整标题字体大小
643
+ if (result.title && result.title.textStyle) {
644
+ result.title.textStyle.fontSize = fontSizeConfig.title;
645
+ }
646
+ if (result.title && result.title.subtextStyle) {
647
+ result.title.subtextStyle.fontSize = fontSizeConfig.subtitle;
648
+ }
649
+
650
+ // 调整图例字体大小
651
+ if (result.legend && result.legend.textStyle) {
652
+ result.legend.textStyle.fontSize = fontSizeConfig.legend;
653
+ }
654
+
655
+ // 调整提示框字体大小
656
+ if (result.tooltip && result.tooltip.textStyle) {
657
+ result.tooltip.textStyle.fontSize = fontSizeConfig.tooltip;
658
+ }
659
+
660
+ // 调整饼图标签字体大小
661
+ if (result.pie && result.pie.label) {
662
+ if (typeof result.pie.label === 'object') {
663
+ result.pie.label.fontSize = fontSizeConfig.label;
664
+ }
665
+ }
666
+
667
+ // 调整雷达图指示器字体大小
668
+ if (result.radar && result.radar.indicator) {
669
+ if (typeof result.radar.indicator === 'object' && result.radar.indicator.textStyle) {
670
+ result.radar.indicator.textStyle.fontSize = fontSizeConfig.label;
671
+ }
672
+ }
673
+
674
+ // 调整地图标签字体大小
675
+ if (result.map && result.map.label) {
676
+ if (typeof result.map.label === 'object') {
677
+ result.map.label.fontSize = fontSizeConfig.label;
678
+ }
679
+ }
680
+
681
+ return result;
682
+ };
683
+
684
+ EchartsUtil.init = function(dom, theme, customOption, size) {
685
+ theme = theme || "default";
686
+ size = size || "medium";
687
+ customOption = customOption || {};
688
+
689
+ const useTheme = this.currentTheme || theme;
690
+ const useSize = this.currentSize || size;
691
+
692
+ this.currentTheme = useTheme;
693
+ this.currentSize = useSize;
694
+
695
+ let themeOption = themeKeys[useTheme];
696
+ // 应用字体大小配置
697
+ themeOption = this.applyFontSize(themeOption, useSize);
698
+
699
+ const option = this.mergeOptions(themeOption, customOption);
700
+
701
+ const chart = echarts["a" /* init */](dom, useTheme);
702
+ chart.setOption(option, true);
703
+
704
+ this.chartInstanceList.push({
705
+ dom,
706
+ chart,
707
+ customOption,
708
+ size: useSize
709
+ });
710
+
711
+ this.bindResize(chart);
712
+ return chart;
713
+ };
714
+
715
+ EchartsUtil.changeSingleTheme = function(dom, chartIns, customOption, newTheme) {
716
+ if (!dom || !chartIns) return;
717
+
718
+ customOption = customOption || {};
719
+ newTheme = newTheme || "default";
720
+
721
+ this.currentTheme = newTheme;
722
+ chartIns.dispose();
723
+
724
+ const newChart = echarts["a" /* init */](dom, newTheme, customOption);
725
+
726
+ const item = this.chartInstanceList.find(function(v) {
727
+ return v.dom === dom;
728
+ });
729
+
730
+ if (item) {
731
+ item.chart = newChart;
732
+ }
733
+
734
+ return newChart;
735
+ };
736
+
737
+ EchartsUtil.changeAllTheme = function(newTheme) {
738
+ if (!newTheme) return;
739
+
740
+ this.currentTheme = newTheme;
741
+
742
+ this.chartInstanceList.forEach(function(item) {
743
+ const dom = item.dom;
744
+ const chart = item.chart;
745
+ const customOption = item.customOption;
746
+
747
+ if (chart) {
748
+ chart.dispose();
749
+ }
750
+
751
+ const newChart = echarts["a" /* init */](dom, newTheme);
752
+ const themeOption = themeKeys[newTheme];
753
+ const option = EchartsUtil.mergeOptions(themeOption, customOption);
754
+
755
+ newChart.setOption(option, true);
756
+ item.chart = newChart;
757
+ EchartsUtil.bindResize(newChart);
758
+ });
759
+ };
760
+
761
+ EchartsUtil.bindResize = function(chartIns) {
762
+ if (!chartIns || chartIns.resizeLocked) return;
763
+
764
+ window.addEventListener("resize", function() {
765
+ chartIns.resize();
766
+ });
767
+
768
+ chartIns._resizeLocked = true;
769
+ };
770
+
771
+ EchartsUtil.destroy = function(chartIns) {
772
+ if (chartIns) {
773
+ chartIns.dispose();
774
+ }
775
+
776
+ this.chartInstanceList = this.chartInstanceList.filter(function(item) {
777
+ return item.chart !== chartIns;
778
+ });
779
+ };
780
+
781
+ EchartsUtil.destroyAll = function() {
782
+ this.chartInstanceList.forEach(function(item) {
783
+ if (item.chart) {
784
+ item.chart.dispose();
785
+ }
786
+ });
787
+
788
+ this.chartInstanceList = [];
789
+ };
790
+
791
+ /* harmony default export */ var utils = __webpack_exports__["a"] = (EchartsUtil);
792
+
793
+
794
+
795
+
796
+ /***/ }),
797
+
798
+ /***/ "51a0":
799
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
800
+
801
+ "use strict";
802
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ExBar_vue_vue_type_style_index_0_id_730aa873_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0f70");
803
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ExBar_vue_vue_type_style_index_0_id_730aa873_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ExBar_vue_vue_type_style_index_0_id_730aa873_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
804
+ /* unused harmony reexport * */
805
+
806
+
807
+ /***/ }),
808
+
809
+ /***/ "5234":
810
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
811
+
812
+ "use strict";
813
+ // ESM COMPAT FLAG
814
+ __webpack_require__.r(__webpack_exports__);
815
+
816
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"2cf63e9b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/chart/ExBar.vue?vue&type=template&id=730aa873&scoped=true
817
+ var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:"barchart",staticClass:"bar-box"})
818
+ }
819
+ var staticRenderFns = []
820
+
821
+
822
+ // CONCATENATED MODULE: ./src/components/chart/ExBar.vue?vue&type=template&id=730aa873&scoped=true
823
+
824
+ // EXTERNAL MODULE: ./src/components/chart/utils.js + 5 modules
825
+ var utils = __webpack_require__("202d");
826
+
827
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/chart/ExBar.vue?vue&type=script&lang=js
828
+
829
+
830
+ /* harmony default export */ var ExBarvue_type_script_lang_js = ({
831
+ name: "XtBar",
832
+ props: {
833
+ chartData: {
834
+ type: Array,
835
+ default: () => {
836
+ return [
837
+ { value: 65, name: "吴十" },
838
+ { value: 70, name: "唐九" },
839
+ { value: 73, name: "钱一" },
840
+ { value: 78, name: "孙二" },
841
+ { value: 88, name: "刘八" },
842
+ { value: 93, name: "王七" },
843
+ { value: 99, name: "赵六" },
844
+ { value: 103, name: "宋五" },
845
+ { value: 113, name: "李四" },
846
+ { value: 125, name: "张三" }
847
+ ];
848
+ }
849
+ },
850
+ theme: {},
851
+ size: {
852
+ type: String,
853
+ default: "medium"
854
+ },
855
+ // name: {
856
+ // type: String,
857
+ // default: ""
858
+ // },
859
+ markPoint: {
860
+ type: Boolean,
861
+ default: false
862
+ },
863
+ energyType: {
864
+ type: String,
865
+ default: ""
866
+ },
867
+ showZoom: {
868
+ type: Boolean,
869
+ default: false
870
+ },
871
+ reverse: {
872
+ type: Boolean,
873
+ default: false
874
+ },
875
+ longLable: { // 名称占50% 的 grid值
876
+ type: Boolean,
877
+ default: false
878
+ },
879
+ longLableSplitNum: {
880
+ type: Number,
881
+ default: 1
882
+ },
883
+ longLablePx: {
884
+ type: Number,
885
+ default: 150
886
+ },
887
+ splitNumber: {
888
+ type: Number,
889
+ default: 5
890
+ }
891
+ },
892
+ data() {
893
+ return {
894
+ myChart: null,
895
+ name: "数量"
896
+ };
897
+ },
898
+ watch: {
899
+ chartData: {
900
+ deep: true,
901
+ handler(newVal, oldVal) {
902
+ const _self = this;
903
+ _self.initChart();
904
+ }
905
+ },
906
+ energyType: {
907
+ deep: true,
908
+ handler(newVal, oldVal) {
909
+ const _self = this;
910
+ if (newVal == "kW.h") {
911
+ _self.name = "用电量";
912
+ } else if (newVal == "m³") {
913
+ _self.name = "用气量";
914
+ }
915
+ _self.initChart();
916
+ }
917
+ }
918
+ },
919
+ mounted() {
920
+ this.initChart();
921
+ },
922
+ methods: {
923
+ initChart() {
924
+ const _self = this;
925
+ // 数据处理
926
+ const _xAxis = {
927
+ type: "category",
928
+ inverse: this.reverse,
929
+ axisLabel: {
930
+ interval: 0,
931
+ formatter: function(value) {
932
+ return !_self.reverse && _self.longLable ? value.replace(new RegExp(`(.{${_self.longLableSplitNum}})`, 'g'), `$1\n`) : value;
933
+ }
934
+ },
935
+ data: _self.chartData.map((item) => {
936
+ return item.name;
937
+ })
938
+ };
939
+ const _yAxis = {
940
+ type: "value",
941
+ splitLine: {
942
+ lineStyle: {
943
+ type: "dashed"
944
+ }
945
+ },
946
+ name: _self.energyType,
947
+ axisTick: {
948
+ inside: true
949
+ },
950
+ min: 0,
951
+ splitNumber: _self.splitNumber,
952
+ max: function(value) {
953
+ return Math.ceil(value.max / _self.splitNumber) * _self.splitNumber;
954
+ },
955
+ scale: true,
956
+ axisLabel: {
957
+ margin: 2,
958
+ formatter: function(value, index) {
959
+ if (value >= 10000 && value < 10000000) {
960
+ value = value / 10000 + "万";
961
+ } else if (value >= 10000000) {
962
+ value = value / 10000000 + "千万";
963
+ }
964
+ return value;
965
+ }
966
+ }
967
+ };
968
+
969
+ const option = {
970
+ legend: {
971
+ right: 20,
972
+ top: 0,
973
+ textStyle: {
974
+ fontSize: 12
975
+ }
976
+ },
977
+ tooltip: {
978
+ borderWidth: 1,
979
+ trigger: "item"
980
+ },
981
+ grid: {
982
+ top: "10",
983
+ left: 40 + (this.reverse && this.longLable ? _self.longLablePx : 0),
984
+ right: "10",
985
+ bottom: (_self.showZoom ? 50 : 20) + (!_self.reverse && _self.longLable ? _self.longLablePx : 0),
986
+ containLabel: true
987
+ },
988
+ xAxis: this.reverse ? _yAxis : _xAxis,
989
+ yAxis: this.reverse ? _xAxis : _yAxis,
990
+ series: [{
991
+ name: _self.name,
992
+ type: "bar",
993
+ markPoint: {
994
+ data: [
995
+ { type: "min", name: "Min" },
996
+ { type: "max", name: "Max" }
997
+ ]
998
+ },
999
+ avoidLabelOverlap: true,
1000
+ data: _self.chartData.map((item, ind) => {
1001
+ const { name, value } = item;
1002
+ return {
1003
+ value,
1004
+ name,
1005
+ tooltip: {
1006
+ borderWidth: 1
1007
+ }
1008
+ };
1009
+ })
1010
+ }],
1011
+ dataZoom: _self.showZoom ? [{ height: 20, bottom: 0 }] : [],
1012
+ };
1013
+ if (!this.markPoint) {
1014
+ this.$delete(option.series[0], "markPoint");
1015
+ }
1016
+ this.myChart = utils["a" /* default */].init(_self.$refs.barchart, this.theme, option, this.size);
1017
+ }
1018
+ }
1019
+ });
1020
+
1021
+ // CONCATENATED MODULE: ./src/components/chart/ExBar.vue?vue&type=script&lang=js
1022
+ /* harmony default export */ var chart_ExBarvue_type_script_lang_js = (ExBarvue_type_script_lang_js);
1023
+ // EXTERNAL MODULE: ./src/components/chart/ExBar.vue?vue&type=style&index=0&id=730aa873&prod&lang=scss&scoped=true
1024
+ var ExBarvue_type_style_index_0_id_730aa873_prod_lang_scss_scoped_true = __webpack_require__("51a0");
1025
+
1026
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1027
+ var componentNormalizer = __webpack_require__("2877");
1028
+
1029
+ // CONCATENATED MODULE: ./src/components/chart/ExBar.vue
1030
+
1031
+
1032
+
1033
+
1034
+
1035
+
1036
+ /* normalize component */
1037
+
1038
+ var component = Object(componentNormalizer["a" /* default */])(
1039
+ chart_ExBarvue_type_script_lang_js,
1040
+ render,
1041
+ staticRenderFns,
1042
+ false,
1043
+ null,
1044
+ "730aa873",
1045
+ null
1046
+
1047
+ )
1048
+
1049
+ /* harmony default export */ var ExBar = __webpack_exports__["default"] = (component.exports);
1050
+
1051
+ /***/ })
1052
+
1053
+ }]);