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