kt-factor-legend 1.0.0 → 1.0.2

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 (42) hide show
  1. package/dist/kt-factor-legend.es.js +761 -0
  2. package/dist/kt-factor-legend.umd.js +1 -0
  3. package/dist/style.css +1 -0
  4. package/dist/wind-level/0.1.png +0 -0
  5. package/dist/wind-level/0.png +0 -0
  6. package/dist/wind-level/1.1.png +0 -0
  7. package/dist/wind-level/1.png +0 -0
  8. package/dist/wind-level/10.1.png +0 -0
  9. package/dist/wind-level/10.png +0 -0
  10. package/dist/wind-level/11.1.png +0 -0
  11. package/dist/wind-level/11.png +0 -0
  12. package/dist/wind-level/12.1.png +0 -0
  13. package/dist/wind-level/12.png +0 -0
  14. package/dist/wind-level/13.1.png +0 -0
  15. package/dist/wind-level/13.png +0 -0
  16. package/dist/wind-level/14.1.png +0 -0
  17. package/dist/wind-level/14.png +0 -0
  18. package/dist/wind-level/15.1.png +0 -0
  19. package/dist/wind-level/15.png +0 -0
  20. package/dist/wind-level/16.1.png +0 -0
  21. package/dist/wind-level/16.png +0 -0
  22. package/dist/wind-level/2.1.png +0 -0
  23. package/dist/wind-level/2.png +0 -0
  24. package/dist/wind-level/3.1.png +0 -0
  25. package/dist/wind-level/3.png +0 -0
  26. package/dist/wind-level/4.1.png +0 -0
  27. package/dist/wind-level/4.png +0 -0
  28. package/dist/wind-level/5.1.png +0 -0
  29. package/dist/wind-level/5.png +0 -0
  30. package/dist/wind-level/6.1.png +0 -0
  31. package/dist/wind-level/6.png +0 -0
  32. package/dist/wind-level/7.1.png +0 -0
  33. package/dist/wind-level/7.png +0 -0
  34. package/dist/wind-level/8.1.png +0 -0
  35. package/dist/wind-level/8.png +0 -0
  36. package/dist/wind-level/9.1.png +0 -0
  37. package/dist/wind-level/9.png +0 -0
  38. package/dist/wind-level/outline.1.png +0 -0
  39. package/dist/wind-level/outline.png +0 -0
  40. package/package.json +2 -3
  41. package/src/index.js +1 -1
  42. package/test/index.vue +0 -0
@@ -0,0 +1,761 @@
1
+ import { reactive as g, onMounted as B, toRefs as v, openBlock as l, createElementBlock as r, Fragment as i, renderList as d, createElementVNode as x, toDisplayString as s, normalizeStyle as D, createCommentVNode as _, resolveComponent as f, createBlock as w, createApp as k } from "vue";
2
+ import y from "element-plus";
3
+ const h = [
4
+ {
5
+ name: "积水深度(cm)",
6
+ key: "waterDepth",
7
+ children: [
8
+ {
9
+ text: "<10",
10
+ color: "#70DFA6"
11
+ },
12
+ {
13
+ text: "10-15",
14
+ color: "#8ED6FD"
15
+ },
16
+ {
17
+ text: "15-27",
18
+ color: "#0098FA"
19
+ },
20
+ {
21
+ text: "27-40",
22
+ color: "#FDCC00"
23
+ },
24
+ {
25
+ text: "40-60",
26
+ color: "#F07E2C"
27
+ },
28
+ {
29
+ text: ">60",
30
+ color: "#EA0000"
31
+ }
32
+ ]
33
+ },
34
+ {
35
+ name: "温度(℃)",
36
+ key: "temp",
37
+ children: [
38
+ {
39
+ text: "-30",
40
+ color: "#1875B6"
41
+ },
42
+ {
43
+ text: "-20",
44
+ color: "#2ABBE5"
45
+ },
46
+ {
47
+ text: "-10",
48
+ color: "#D1F4F2"
49
+ },
50
+ {
51
+ text: "0",
52
+ color: "#CBE4BE"
53
+ },
54
+ {
55
+ text: "10",
56
+ color: "#B1D162"
57
+ },
58
+ {
59
+ text: "20",
60
+ color: "#D3DD52"
61
+ },
62
+ {
63
+ text: "30",
64
+ color: "#F0E94B"
65
+ },
66
+ {
67
+ text: "40",
68
+ color: "#E48529"
69
+ },
70
+ {
71
+ text: "",
72
+ color: "#E74526"
73
+ }
74
+ ]
75
+ },
76
+ {
77
+ name: "气压(hPa)",
78
+ key: "pres",
79
+ children: [
80
+ {
81
+ text: "948",
82
+ color: "#DFF5FD"
83
+ },
84
+ {
85
+ text: "964",
86
+ color: "#AEE5FA"
87
+ },
88
+ {
89
+ text: "981",
90
+ color: "#76D6F8"
91
+ },
92
+ {
93
+ text: "997",
94
+ color: "#38C3F5"
95
+ },
96
+ {
97
+ text: "1015",
98
+ color: "#00B7F2"
99
+ },
100
+ {
101
+ text: "1020",
102
+ color: "#00AAF1"
103
+ },
104
+ {
105
+ text: "1030",
106
+ color: "#009CE2"
107
+ },
108
+ {
109
+ text: "1040",
110
+ color: "#0089CD"
111
+ },
112
+ {
113
+ text: "1050",
114
+ color: "#0078BA"
115
+ },
116
+ {
117
+ text: "",
118
+ color: "#0B599A"
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ name: "湿度(%)",
124
+ key: "rh",
125
+ children: [
126
+ {
127
+ text: "10",
128
+ color: "#E74526"
129
+ },
130
+ {
131
+ text: "20",
132
+ color: "#E48529"
133
+ },
134
+ {
135
+ text: "30",
136
+ color: "#F0E94B"
137
+ },
138
+ {
139
+ text: "40",
140
+ color: "#D3DD52"
141
+ },
142
+ {
143
+ text: "50",
144
+ color: "#B1D162"
145
+ },
146
+ {
147
+ text: "60",
148
+ color: "#CBE4BE"
149
+ },
150
+ {
151
+ text: "70",
152
+ color: "#D1F4F2"
153
+ },
154
+ {
155
+ text: "80",
156
+ color: "#2ABBE5"
157
+ },
158
+ {
159
+ text: "90",
160
+ color: "#1875B6"
161
+ },
162
+ {
163
+ text: "100",
164
+ color: "#133DB5"
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ name: "风级",
170
+ key: "wind-l",
171
+ Children: [
172
+ { name: "静风", value: 0, icon: "/wind-level/0.png" },
173
+ { name: "1级风", value: 1, icon: "/wind-level/1.png" },
174
+ { name: "2级风", value: 2, icon: "/wind-level/2.png" },
175
+ { name: "3级风", value: 3, icon: "/wind-level/3.png" },
176
+ { name: "4级风", value: 4, icon: "/wind-level/4.png" },
177
+ { name: "5级风", value: 5, icon: "/wind-level/5.png" },
178
+ { name: "6级风", value: 6, icon: "/wind-level/6.png" },
179
+ { name: "7级风", value: 7, icon: "/wind-level/7.png" },
180
+ { name: "8级风", value: 8, icon: "/wind-level/8.png" },
181
+ { name: "9级风", value: 9, icon: "/wind-level/9.png" },
182
+ { name: "10级风", value: 10, icon: "/wind-level/10.png" },
183
+ { name: "11级风", value: 11, icon: "/wind-level/11.png" },
184
+ { name: "12级风", value: 12, icon: "/wind-level/12.png" },
185
+ { name: "13级风", value: 13, icon: "/wind-level/13.png" },
186
+ { name: "14级风", value: 14, icon: "/wind-level/14.png" },
187
+ { name: "15级风", value: 15, icon: "/wind-level/15.png" },
188
+ { name: "16级风", value: 16, icon: "/wind-level/16.png" }
189
+ ]
190
+ },
191
+ {
192
+ name: "5分钟累积降雨(mm)",
193
+ key: "prep_5min",
194
+ children: [
195
+ {
196
+ text: "0.4",
197
+ color: "#BDF071"
198
+ },
199
+ {
200
+ text: "1.0",
201
+ color: "#4B7902"
202
+ },
203
+ {
204
+ text: "2.0",
205
+ color: "#1BB1F1"
206
+ },
207
+ {
208
+ text: "5.0",
209
+ color: "#0000FF"
210
+ },
211
+ {
212
+ text: "10",
213
+ color: "#EC808D"
214
+ },
215
+ {
216
+ text: "",
217
+ color: "#D900B6"
218
+ }
219
+ ]
220
+ },
221
+ {
222
+ name: "1小时降雨(mm)",
223
+ key: "prep_1h",
224
+ children: [
225
+ {
226
+ text: "<1.5",
227
+ color: "#B8EF9E"
228
+ },
229
+ {
230
+ text: "1.6-6.9",
231
+ color: "#66B755"
232
+ },
233
+ {
234
+ text: "7-14.9",
235
+ color: "#7AB8F7"
236
+ },
237
+ {
238
+ text: "15-39.9",
239
+ color: "#8792FD"
240
+ },
241
+ {
242
+ text: "40-49.9",
243
+ color: "#E440EF"
244
+ },
245
+ {
246
+ text: ">50",
247
+ color: "#74173F"
248
+ }
249
+ ]
250
+ },
251
+ {
252
+ name: "3小时降雨(mm)",
253
+ key: "prep_3h",
254
+ children: [
255
+ {
256
+ text: "<2.9",
257
+ color: "#B8EF9E"
258
+ },
259
+ {
260
+ text: "3-9.9",
261
+ color: "#66B755"
262
+ },
263
+ {
264
+ text: "10-19.9",
265
+ color: "#7AB8F7"
266
+ },
267
+ {
268
+ text: "20-49.9",
269
+ color: "#8792FD"
270
+ },
271
+ {
272
+ text: "50-69.9",
273
+ color: "#E440EF"
274
+ },
275
+ {
276
+ text: ">70",
277
+ color: "#74173F"
278
+ }
279
+ ]
280
+ },
281
+ {
282
+ name: "6小时降雨(mm)",
283
+ key: "prep_6h",
284
+ children: [
285
+ {
286
+ text: "<3.9",
287
+ color: "#B8EF9E"
288
+ },
289
+ {
290
+ text: "4-12.9",
291
+ color: "#66B755"
292
+ },
293
+ {
294
+ text: "13-24.9",
295
+ color: "#7AB8F7"
296
+ },
297
+ {
298
+ text: "25-59.9",
299
+ color: "#8792FD"
300
+ },
301
+ {
302
+ text: "60-119.9",
303
+ color: "#E440EF"
304
+ },
305
+ {
306
+ text: ">120",
307
+ color: "#74173F"
308
+ }
309
+ ]
310
+ },
311
+ {
312
+ name: "12小时降雨(mm)",
313
+ key: "prep_12h",
314
+ children: [
315
+ {
316
+ text: "<4.9",
317
+ color: "#B8EF9E"
318
+ },
319
+ {
320
+ text: "5-14.9",
321
+ color: "#66B755"
322
+ },
323
+ {
324
+ text: "15-29.9",
325
+ color: "#7AB8F7"
326
+ },
327
+ {
328
+ text: "30-69.9",
329
+ color: "#8792FD"
330
+ },
331
+ {
332
+ text: "70-139.9",
333
+ color: "#E440EF"
334
+ },
335
+ {
336
+ text: ">140",
337
+ color: "#74173F"
338
+ }
339
+ ]
340
+ },
341
+ {
342
+ name: "24小时降雨(mm)",
343
+ key: "prep_24h",
344
+ children: [
345
+ {
346
+ text: "<9.9",
347
+ color: "#B8EF9E"
348
+ },
349
+ {
350
+ text: "10-24.9",
351
+ color: "#66B755"
352
+ },
353
+ {
354
+ text: "25-49.9",
355
+ color: "#7AB8F7"
356
+ },
357
+ {
358
+ text: "50-99.9",
359
+ color: "#8792FD"
360
+ },
361
+ {
362
+ text: "100-250",
363
+ color: "#E440EF"
364
+ },
365
+ {
366
+ text: ">250",
367
+ color: "#74173F"
368
+ }
369
+ ]
370
+ },
371
+ {
372
+ name: "未来1小时降雨预报(mm)",
373
+ key: "prep_f_1h",
374
+ children: [
375
+ {
376
+ text: "<1.5",
377
+ color: "#B8EF9E"
378
+ },
379
+ {
380
+ text: "1.6-6.9",
381
+ color: "#66B755"
382
+ },
383
+ {
384
+ text: "7-14.9",
385
+ color: "#7AB8F7"
386
+ },
387
+ {
388
+ text: "15-39.9",
389
+ color: "#8792FD"
390
+ },
391
+ {
392
+ text: "40-49.9",
393
+ color: "#E440EF"
394
+ },
395
+ {
396
+ text: ">50",
397
+ color: "#74173F"
398
+ }
399
+ ]
400
+ },
401
+ {
402
+ name: "未来3小时降雨预报(mm)",
403
+ key: "prep_f_3h",
404
+ children: [
405
+ {
406
+ text: "<2.9",
407
+ color: "#B8EF9E"
408
+ },
409
+ {
410
+ text: "3-9.9",
411
+ color: "#66B755"
412
+ },
413
+ {
414
+ text: "10-19.9",
415
+ color: "#7AB8F7"
416
+ },
417
+ {
418
+ text: "20-49.9",
419
+ color: "#8792FD"
420
+ },
421
+ {
422
+ text: "50-69.9",
423
+ color: "#E440EF"
424
+ },
425
+ {
426
+ text: ">70",
427
+ color: "#74173F"
428
+ }
429
+ ]
430
+ },
431
+ {
432
+ name: "未来6小时降雨预报(mm)",
433
+ key: "prep_f_6h",
434
+ children: [
435
+ {
436
+ text: "<3.9",
437
+ color: "#B8EF9E"
438
+ },
439
+ {
440
+ text: "4-12.9",
441
+ color: "#66B755"
442
+ },
443
+ {
444
+ text: "13-24.9",
445
+ color: "#7AB8F7"
446
+ },
447
+ {
448
+ text: "25-59.9",
449
+ color: "#8792FD"
450
+ },
451
+ {
452
+ text: "60-119.9",
453
+ color: "#E440EF"
454
+ },
455
+ {
456
+ text: ">120",
457
+ color: "#74173F"
458
+ }
459
+ ]
460
+ },
461
+ {
462
+ name: "未来12小时降雨预报(mm)",
463
+ key: "prep_f_12h",
464
+ children: [
465
+ {
466
+ text: "<4.9",
467
+ color: "#B8EF9E"
468
+ },
469
+ {
470
+ text: "5-14.9",
471
+ color: "#66B755"
472
+ },
473
+ {
474
+ text: "15-29.9",
475
+ color: "#7AB8F7"
476
+ },
477
+ {
478
+ text: "30-69.9",
479
+ color: "#8792FD"
480
+ },
481
+ {
482
+ text: "70-139.9",
483
+ color: "#E440EF"
484
+ },
485
+ {
486
+ text: ">140",
487
+ color: "#74173F"
488
+ }
489
+ ]
490
+ },
491
+ {
492
+ name: "未来24小时降雨预报(mm)",
493
+ key: "prep_f_24h",
494
+ children: [
495
+ {
496
+ text: "<9.9",
497
+ color: "#B8EF9E"
498
+ },
499
+ {
500
+ text: "10-24.9",
501
+ color: "#66B755"
502
+ },
503
+ {
504
+ text: "25-49.9",
505
+ color: "#7AB8F7"
506
+ },
507
+ {
508
+ text: "50-99.9",
509
+ color: "#8792FD"
510
+ },
511
+ {
512
+ text: "100-250",
513
+ color: "#E440EF"
514
+ },
515
+ {
516
+ text: ">250",
517
+ color: "#74173F"
518
+ }
519
+ ]
520
+ }
521
+ ], F = (t, n) => {
522
+ const o = t.__vccOpts || t;
523
+ for (const [c, a] of n)
524
+ o[c] = a;
525
+ return o;
526
+ }, A = {
527
+ name: "legendIndex",
528
+ props: {
529
+ elements: {
530
+ type: Array,
531
+ required: !1
532
+ }
533
+ },
534
+ setup(t, n) {
535
+ const o = g({
536
+ factors: []
537
+ });
538
+ return B(() => {
539
+ o.factors = t.elements || h, console.log(h);
540
+ }), {
541
+ ...{},
542
+ ...v(o)
543
+ };
544
+ }
545
+ }, b = { class: "legend-index" }, L = {
546
+ key: 0,
547
+ class: "legend-group"
548
+ }, C = { class: "legend-item" }, T = { class: "legend-name" }, $ = { class: "legend-color" };
549
+ function P(t, n, o, c, a, u) {
550
+ return l(), r("div", b, [
551
+ (l(!0), r(i, null, d(t.factors, (e) => {
552
+ var m;
553
+ return l(), r(i, {
554
+ key: e.key
555
+ }, [
556
+ (m = e == null ? void 0 : e.children) != null && m.length ? (l(), r("div", L, [
557
+ x("div", C, [
558
+ x("div", T, s(e.name), 1),
559
+ x("div", $, [
560
+ (l(!0), r(i, null, d(e.children, (p, E) => (l(), r("div", {
561
+ key: E,
562
+ style: D({ backgroundColor: p.color })
563
+ }, s(p.text), 5))), 128))
564
+ ])
565
+ ])
566
+ ])) : _("", !0)
567
+ ], 64);
568
+ }), 128))
569
+ ]);
570
+ }
571
+ const M = /* @__PURE__ */ F(A, [["render", P]]), R = {
572
+ name: "App",
573
+ components: {
574
+ LegendIndex: M
575
+ }
576
+ };
577
+ function I(t, n, o, c, a, u) {
578
+ const e = f("LegendIndex");
579
+ return l(), w(e);
580
+ }
581
+ const z = /* @__PURE__ */ F(R, [["render", I]]);
582
+ var S = {
583
+ name: "zh-cn",
584
+ el: {
585
+ breadcrumb: { label: "面包屑" },
586
+ colorpicker: {
587
+ confirm: "确定",
588
+ clear: "清空",
589
+ defaultLabel: "颜色选择器",
590
+ description: "当前颜色 {color},按 Enter 键选择新颜色",
591
+ alphaLabel: "选择透明度的值",
592
+ alphaDescription: "透明度 {alpha}, 当前颜色 {color}",
593
+ hueLabel: "选择色相值",
594
+ hueDescription: "色相 {hue}, 当前颜色 {color}",
595
+ svLabel: "选择饱和度与明度的值",
596
+ svDescription: "饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",
597
+ predefineDescription: "选择 {value} 作为颜色"
598
+ },
599
+ datepicker: {
600
+ now: "此刻",
601
+ today: "今天",
602
+ cancel: "取消",
603
+ clear: "清空",
604
+ confirm: "确定",
605
+ dateTablePrompt: "使用方向键与 Enter 键可选择日期",
606
+ monthTablePrompt: "使用方向键与 Enter 键可选择月份",
607
+ yearTablePrompt: "使用方向键与 Enter 键可选择年份",
608
+ selectedDate: "已选日期",
609
+ selectDate: "选择日期",
610
+ selectTime: "选择时间",
611
+ startDate: "开始日期",
612
+ startTime: "开始时间",
613
+ endDate: "结束日期",
614
+ endTime: "结束时间",
615
+ prevYear: "前一年",
616
+ nextYear: "后一年",
617
+ prevMonth: "上个月",
618
+ nextMonth: "下个月",
619
+ year: "年",
620
+ month1: "1 月",
621
+ month2: "2 月",
622
+ month3: "3 月",
623
+ month4: "4 月",
624
+ month5: "5 月",
625
+ month6: "6 月",
626
+ month7: "7 月",
627
+ month8: "8 月",
628
+ month9: "9 月",
629
+ month10: "10 月",
630
+ month11: "11 月",
631
+ month12: "12 月",
632
+ weeks: {
633
+ sun: "日",
634
+ mon: "一",
635
+ tue: "二",
636
+ wed: "三",
637
+ thu: "四",
638
+ fri: "五",
639
+ sat: "六"
640
+ },
641
+ weeksFull: {
642
+ sun: "星期日",
643
+ mon: "星期一",
644
+ tue: "星期二",
645
+ wed: "星期三",
646
+ thu: "星期四",
647
+ fri: "星期五",
648
+ sat: "星期六"
649
+ },
650
+ months: {
651
+ jan: "一月",
652
+ feb: "二月",
653
+ mar: "三月",
654
+ apr: "四月",
655
+ may: "五月",
656
+ jun: "六月",
657
+ jul: "七月",
658
+ aug: "八月",
659
+ sep: "九月",
660
+ oct: "十月",
661
+ nov: "十一月",
662
+ dec: "十二月"
663
+ }
664
+ },
665
+ inputNumber: {
666
+ decrease: "减少数值",
667
+ increase: "增加数值"
668
+ },
669
+ select: {
670
+ loading: "加载中",
671
+ noMatch: "无匹配数据",
672
+ noData: "无数据",
673
+ placeholder: "请选择"
674
+ },
675
+ mention: { loading: "加载中" },
676
+ dropdown: { toggleDropdown: "切换下拉选项" },
677
+ cascader: {
678
+ noMatch: "无匹配数据",
679
+ loading: "加载中",
680
+ placeholder: "请选择",
681
+ noData: "暂无数据"
682
+ },
683
+ pagination: {
684
+ goto: "前往",
685
+ pagesize: "条/页",
686
+ total: "共 {total} 条",
687
+ pageClassifier: "页",
688
+ page: "页",
689
+ prev: "上一页",
690
+ next: "下一页",
691
+ currentPage: "第 {pager} 页",
692
+ prevPages: "向前 {pager} 页",
693
+ nextPages: "向后 {pager} 页",
694
+ deprecationWarning: "你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"
695
+ },
696
+ dialog: { close: "关闭此对话框" },
697
+ drawer: { close: "关闭此对话框" },
698
+ messagebox: {
699
+ title: "提示",
700
+ confirm: "确定",
701
+ cancel: "取消",
702
+ error: "输入的数据不合法!",
703
+ close: "关闭此对话框"
704
+ },
705
+ upload: {
706
+ deleteTip: "按 Delete 键可删除",
707
+ delete: "删除",
708
+ preview: "查看图片",
709
+ continue: "继续上传"
710
+ },
711
+ slider: {
712
+ defaultLabel: "滑块介于 {min} 至 {max}",
713
+ defaultRangeStartLabel: "选择起始值",
714
+ defaultRangeEndLabel: "选择结束值"
715
+ },
716
+ table: {
717
+ emptyText: "暂无数据",
718
+ confirmFilter: "筛选",
719
+ resetFilter: "重置",
720
+ clearFilter: "全部",
721
+ sumText: "合计",
722
+ selectAllLabel: "选择所有行",
723
+ selectRowLabel: "选择当前行",
724
+ expandRowLabel: "展开当前行",
725
+ collapseRowLabel: "收起当前行",
726
+ sortLabel: "按 {column} 排序",
727
+ filterLabel: "按 {column} 过滤"
728
+ },
729
+ tag: { close: "关闭此标签" },
730
+ tour: {
731
+ next: "下一步",
732
+ previous: "上一步",
733
+ finish: "结束导览",
734
+ close: "关闭此对话框"
735
+ },
736
+ tree: { emptyText: "暂无数据" },
737
+ transfer: {
738
+ noMatch: "无匹配数据",
739
+ noData: "无数据",
740
+ titles: ["列表 1", "列表 2"],
741
+ filterPlaceholder: "请输入搜索内容",
742
+ noCheckedFormat: "共 {total} 项",
743
+ hasCheckedFormat: "已选 {checked}/{total} 项"
744
+ },
745
+ image: { error: "加载失败" },
746
+ pageHeader: { title: "返回" },
747
+ popconfirm: {
748
+ confirmButtonText: "确定",
749
+ cancelButtonText: "取消"
750
+ },
751
+ carousel: {
752
+ leftArrow: "上一张幻灯片",
753
+ rightArrow: "下一张幻灯片",
754
+ indicator: "幻灯片切换至索引 {index}"
755
+ }
756
+ }
757
+ };
758
+ k(z).use(y, { locale: S }).mount("#app");
759
+ export {
760
+ M as StationIndex
761
+ };