kt-factor-legend 1.0.7 → 1.0.8

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.
@@ -1,5 +1,6 @@
1
- import { openBlock as r, createElementBlock as c, Fragment as a, renderList as E, createElementVNode as F, toDisplayString as p, normalizeStyle as v, createCommentVNode as h, reactive as D, watch as u, onMounted as _, toRefs as g } from "vue";
2
- const s = [
1
+ import { openBlock as e, createElementBlock as t, normalizeClass as u, Fragment as x, renderList as p, createElementVNode as a, toDisplayString as m, normalizeStyle as g, createCommentVNode as v, reactive as B, watch as D, onMounted as f, toRefs as _, createApp as y } from "vue";
2
+ import k from "element-plus";
3
+ const E = [
3
4
  {
4
5
  name: "积水深度(cm)",
5
6
  key: "waterDepth",
@@ -167,24 +168,25 @@ const s = [
167
168
  {
168
169
  name: "风级",
169
170
  key: "wind-l",
171
+ type: "icon",
170
172
  children: [
171
- { name: "静风", value: 0, icon: "/wind-level/0.png" },
172
- { name: "1级风", value: 1, icon: "/wind-level/1.png" },
173
- { name: "2级风", value: 2, icon: "/wind-level/2.png" },
174
- { name: "3级风", value: 3, icon: "/wind-level/3.png" },
175
- { name: "4级风", value: 4, icon: "/wind-level/4.png" },
176
- { name: "5级风", value: 5, icon: "/wind-level/5.png" },
177
- { name: "6级风", value: 6, icon: "/wind-level/6.png" },
178
- { name: "7级风", value: 7, icon: "/wind-level/7.png" },
179
- { name: "8级风", value: 8, icon: "/wind-level/8.png" },
180
- { name: "9级风", value: 9, icon: "/wind-level/9.png" },
181
- { name: "10级风", value: 10, icon: "/wind-level/10.png" },
182
- { name: "11级风", value: 11, icon: "/wind-level/11.png" },
183
- { name: "12级风", value: 12, icon: "/wind-level/12.png" },
184
- { name: "13级风", value: 13, icon: "/wind-level/13.png" },
185
- { name: "14级风", value: 14, icon: "/wind-level/14.png" },
186
- { name: "15级风", value: 15, icon: "/wind-level/15.png" },
187
- { name: "16级风", value: 16, icon: "/wind-level/16.png" }
173
+ { text: "静风", value: 0, icon: "/wind-level/0.png" },
174
+ { text: "1级风", value: 1, icon: "/wind-level/1.png" },
175
+ { text: "2级风", value: 2, icon: "/wind-level/2.png" },
176
+ { text: "3级风", value: 3, icon: "/wind-level/3.png" },
177
+ { text: "4级风", value: 4, icon: "/wind-level/4.png" },
178
+ { text: "5级风", value: 5, icon: "/wind-level/5.png" },
179
+ { text: "6级风", value: 6, icon: "/wind-level/6.png" },
180
+ { text: "7级风", value: 7, icon: "/wind-level/7.png" },
181
+ { text: "8级风", value: 8, icon: "/wind-level/8.png" },
182
+ { text: "9级风", value: 9, icon: "/wind-level/9.png" },
183
+ { text: "10级风", value: 10, icon: "/wind-level/10.png" },
184
+ { text: "11级风", value: 11, icon: "/wind-level/11.png" },
185
+ { text: "12级风", value: 12, icon: "/wind-level/12.png" },
186
+ { text: "13级风", value: 13, icon: "/wind-level/13.png" },
187
+ { text: "14级风", value: 14, icon: "/wind-level/14.png" },
188
+ { text: "15级风", value: 15, icon: "/wind-level/15.png" },
189
+ { text: "16级风", value: 16, icon: "/wind-level/16.png" }
188
190
  ]
189
191
  },
190
192
  {
@@ -517,71 +519,270 @@ const s = [
517
519
  }
518
520
  ]
519
521
  }
520
- ], y = (e, x) => {
521
- const t = e.__vccOpts || e;
522
- for (const [o, n] of x)
523
- t[o] = n;
524
- return t;
525
- }, k = {
522
+ ], w = (l, s) => {
523
+ const r = l.__vccOpts || l;
524
+ for (const [c, i] of s)
525
+ r[c] = i;
526
+ return r;
527
+ }, b = {
526
528
  name: "legendIndex",
527
529
  props: {
528
530
  elements: {
529
531
  type: Array,
530
532
  required: !1
533
+ },
534
+ dark: {
535
+ type: Boolean,
536
+ required: !1
531
537
  }
532
538
  },
533
- setup(e, x) {
534
- const t = D({
539
+ setup(l, s) {
540
+ const r = B({
535
541
  factors: []
536
542
  });
537
- u(
538
- () => e.elements,
543
+ D(
544
+ () => l.elements,
539
545
  () => {
540
- o.processData();
546
+ c.processData();
541
547
  },
542
548
  { deep: !0 }
543
- ), _(() => {
544
- o.processData();
549
+ ), f(() => {
550
+ c.processData();
545
551
  });
546
- const o = {
552
+ const c = {
547
553
  processData() {
548
- var n;
549
- (n = e.elements) != null && n.length ? t.factors = s.filter((i) => e.elements.includes(i.key)) : t.factors = s;
554
+ var i;
555
+ (i = l.elements) != null && i.length ? r.factors = E.filter((h) => l.elements.includes(h.key)) : r.factors = E;
550
556
  }
551
557
  };
552
558
  return {
553
- ...o,
554
- ...g(t)
559
+ ...c,
560
+ ..._(r)
555
561
  };
556
562
  }
557
- }, A = { class: "legend-index" }, f = {
563
+ }, A = { class: "legend-item" }, C = { class: "legend-name" }, L = {
558
564
  key: 0,
559
- class: "legend-group"
560
- }, w = { class: "legend-item" }, C = { class: "legend-name" }, $ = { class: "legend-color" };
561
- function L(e, x, t, o, n, i) {
562
- return r(), c("div", A, [
563
- (r(!0), c(a, null, E(e.factors, (l) => {
564
- var m;
565
- return r(), c(a, {
566
- key: l.key
565
+ class: "legend-image"
566
+ }, T = ["src", "alt"], P = { class: "text" }, M = {
567
+ key: 1,
568
+ class: "legend-color"
569
+ }, R = { class: "text" };
570
+ function z(l, s, r, c, i, h) {
571
+ return e(), t("div", {
572
+ class: u(["legend-index", { dark: r.dark }])
573
+ }, [
574
+ (e(!0), t(x, null, p(l.factors, (o) => {
575
+ var F;
576
+ return e(), t(x, {
577
+ key: o.key
567
578
  }, [
568
- (m = l == null ? void 0 : l.children) != null && m.length ? (r(), c("div", f, [
569
- F("div", w, [
570
- F("div", C, p(l.name), 1),
571
- F("div", $, [
572
- (r(!0), c(a, null, E(l.children, (d, B) => (r(), c("div", {
573
- key: B,
574
- style: v({ backgroundColor: d.color })
575
- }, p(d.text), 5))), 128))
576
- ])
579
+ (F = o == null ? void 0 : o.children) != null && F.length ? (e(), t("div", {
580
+ key: 0,
581
+ class: u(["legend-group", o.key])
582
+ }, [
583
+ a("div", A, [
584
+ a("div", C, m(o.name), 1),
585
+ o.type == "icon" ? (e(), t("div", L, [
586
+ (e(!0), t(x, null, p(o.children, (n, d) => (e(), t("div", { key: d }, [
587
+ a("img", {
588
+ src: n.icon,
589
+ alt: n.text
590
+ }, null, 8, T),
591
+ a("div", P, m(n.text), 1)
592
+ ]))), 128))
593
+ ])) : (e(), t("div", M, [
594
+ (e(!0), t(x, null, p(o.children, (n, d) => (e(), t("div", { key: d }, [
595
+ a("div", {
596
+ class: "bar",
597
+ style: g({ backgroundColor: n.color })
598
+ }, null, 4),
599
+ a("div", R, m(n.text), 1)
600
+ ]))), 128))
601
+ ]))
577
602
  ])
578
- ])) : h("", !0)
603
+ ], 2)) : v("", !0)
579
604
  ], 64);
580
605
  }), 128))
581
- ]);
606
+ ], 2);
582
607
  }
583
- const N = /* @__PURE__ */ y(k, [["render", L]]);
608
+ const j = /* @__PURE__ */ w(b, [["render", z]]);
609
+ var N = {
610
+ name: "zh-cn",
611
+ el: {
612
+ breadcrumb: { label: "面包屑" },
613
+ colorpicker: {
614
+ confirm: "确定",
615
+ clear: "清空",
616
+ defaultLabel: "颜色选择器",
617
+ description: "当前颜色 {color},按 Enter 键选择新颜色",
618
+ alphaLabel: "选择透明度的值",
619
+ alphaDescription: "透明度 {alpha}, 当前颜色 {color}",
620
+ hueLabel: "选择色相值",
621
+ hueDescription: "色相 {hue}, 当前颜色 {color}",
622
+ svLabel: "选择饱和度与明度的值",
623
+ svDescription: "饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",
624
+ predefineDescription: "选择 {value} 作为颜色"
625
+ },
626
+ datepicker: {
627
+ now: "此刻",
628
+ today: "今天",
629
+ cancel: "取消",
630
+ clear: "清空",
631
+ confirm: "确定",
632
+ dateTablePrompt: "使用方向键与 Enter 键可选择日期",
633
+ monthTablePrompt: "使用方向键与 Enter 键可选择月份",
634
+ yearTablePrompt: "使用方向键与 Enter 键可选择年份",
635
+ selectedDate: "已选日期",
636
+ selectDate: "选择日期",
637
+ selectTime: "选择时间",
638
+ startDate: "开始日期",
639
+ startTime: "开始时间",
640
+ endDate: "结束日期",
641
+ endTime: "结束时间",
642
+ prevYear: "前一年",
643
+ nextYear: "后一年",
644
+ prevMonth: "上个月",
645
+ nextMonth: "下个月",
646
+ year: "年",
647
+ month1: "1 月",
648
+ month2: "2 月",
649
+ month3: "3 月",
650
+ month4: "4 月",
651
+ month5: "5 月",
652
+ month6: "6 月",
653
+ month7: "7 月",
654
+ month8: "8 月",
655
+ month9: "9 月",
656
+ month10: "10 月",
657
+ month11: "11 月",
658
+ month12: "12 月",
659
+ weeks: {
660
+ sun: "日",
661
+ mon: "一",
662
+ tue: "二",
663
+ wed: "三",
664
+ thu: "四",
665
+ fri: "五",
666
+ sat: "六"
667
+ },
668
+ weeksFull: {
669
+ sun: "星期日",
670
+ mon: "星期一",
671
+ tue: "星期二",
672
+ wed: "星期三",
673
+ thu: "星期四",
674
+ fri: "星期五",
675
+ sat: "星期六"
676
+ },
677
+ months: {
678
+ jan: "一月",
679
+ feb: "二月",
680
+ mar: "三月",
681
+ apr: "四月",
682
+ may: "五月",
683
+ jun: "六月",
684
+ jul: "七月",
685
+ aug: "八月",
686
+ sep: "九月",
687
+ oct: "十月",
688
+ nov: "十一月",
689
+ dec: "十二月"
690
+ }
691
+ },
692
+ inputNumber: {
693
+ decrease: "减少数值",
694
+ increase: "增加数值"
695
+ },
696
+ select: {
697
+ loading: "加载中",
698
+ noMatch: "无匹配数据",
699
+ noData: "无数据",
700
+ placeholder: "请选择"
701
+ },
702
+ mention: { loading: "加载中" },
703
+ dropdown: { toggleDropdown: "切换下拉选项" },
704
+ cascader: {
705
+ noMatch: "无匹配数据",
706
+ loading: "加载中",
707
+ placeholder: "请选择",
708
+ noData: "暂无数据"
709
+ },
710
+ pagination: {
711
+ goto: "前往",
712
+ pagesize: "条/页",
713
+ total: "共 {total} 条",
714
+ pageClassifier: "页",
715
+ page: "页",
716
+ prev: "上一页",
717
+ next: "下一页",
718
+ currentPage: "第 {pager} 页",
719
+ prevPages: "向前 {pager} 页",
720
+ nextPages: "向后 {pager} 页",
721
+ deprecationWarning: "你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"
722
+ },
723
+ dialog: { close: "关闭此对话框" },
724
+ drawer: { close: "关闭此对话框" },
725
+ messagebox: {
726
+ title: "提示",
727
+ confirm: "确定",
728
+ cancel: "取消",
729
+ error: "输入的数据不合法!",
730
+ close: "关闭此对话框"
731
+ },
732
+ upload: {
733
+ deleteTip: "按 Delete 键可删除",
734
+ delete: "删除",
735
+ preview: "查看图片",
736
+ continue: "继续上传"
737
+ },
738
+ slider: {
739
+ defaultLabel: "滑块介于 {min} 至 {max}",
740
+ defaultRangeStartLabel: "选择起始值",
741
+ defaultRangeEndLabel: "选择结束值"
742
+ },
743
+ table: {
744
+ emptyText: "暂无数据",
745
+ confirmFilter: "筛选",
746
+ resetFilter: "重置",
747
+ clearFilter: "全部",
748
+ sumText: "合计",
749
+ selectAllLabel: "选择所有行",
750
+ selectRowLabel: "选择当前行",
751
+ expandRowLabel: "展开当前行",
752
+ collapseRowLabel: "收起当前行",
753
+ sortLabel: "按 {column} 排序",
754
+ filterLabel: "按 {column} 过滤"
755
+ },
756
+ tag: { close: "关闭此标签" },
757
+ tour: {
758
+ next: "下一步",
759
+ previous: "上一步",
760
+ finish: "结束导览",
761
+ close: "关闭此对话框"
762
+ },
763
+ tree: { emptyText: "暂无数据" },
764
+ transfer: {
765
+ noMatch: "无匹配数据",
766
+ noData: "无数据",
767
+ titles: ["列表 1", "列表 2"],
768
+ filterPlaceholder: "请输入搜索内容",
769
+ noCheckedFormat: "共 {total} 项",
770
+ hasCheckedFormat: "已选 {checked}/{total} 项"
771
+ },
772
+ image: { error: "加载失败" },
773
+ pageHeader: { title: "返回" },
774
+ popconfirm: {
775
+ confirmButtonText: "确定",
776
+ cancelButtonText: "取消"
777
+ },
778
+ carousel: {
779
+ leftArrow: "上一张幻灯片",
780
+ rightArrow: "下一张幻灯片",
781
+ indicator: "幻灯片切换至索引 {index}"
782
+ }
783
+ }
784
+ };
785
+ y(j).use(k, { locale: N }).mount("#app");
584
786
  export {
585
- N as KtFactorLegend,
586
- N as default
787
+ j as KtFactorLegend
587
788
  };
@@ -1 +1 @@
1
- (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.KtFactorLegend={},t.Vue))})(this,function(t,e){"use strict";const x=[{name:"积水深度(cm)",key:"waterDepth",children:[{text:"<10",color:"#70DFA6"},{text:"10-15",color:"#8ED6FD"},{text:"15-27",color:"#0098FA"},{text:"27-40",color:"#FDCC00"},{text:"40-60",color:"#F07E2C"},{text:">60",color:"#EA0000"}]},{name:"温度(℃)",key:"temp",children:[{text:"-30",color:"#1875B6"},{text:"-20",color:"#2ABBE5"},{text:"-10",color:"#D1F4F2"},{text:"0",color:"#CBE4BE"},{text:"10",color:"#B1D162"},{text:"20",color:"#D3DD52"},{text:"30",color:"#F0E94B"},{text:"40",color:"#E48529"},{text:"",color:"#E74526"}]},{name:"气压(hPa)",key:"pres",children:[{text:"948",color:"#DFF5FD"},{text:"964",color:"#AEE5FA"},{text:"981",color:"#76D6F8"},{text:"997",color:"#38C3F5"},{text:"1015",color:"#00B7F2"},{text:"1020",color:"#00AAF1"},{text:"1030",color:"#009CE2"},{text:"1040",color:"#0089CD"},{text:"1050",color:"#0078BA"},{text:"",color:"#0B599A"}]},{name:"湿度(%)",key:"rh",children:[{text:"10",color:"#E74526"},{text:"20",color:"#E48529"},{text:"30",color:"#F0E94B"},{text:"40",color:"#D3DD52"},{text:"50",color:"#B1D162"},{text:"60",color:"#CBE4BE"},{text:"70",color:"#D1F4F2"},{text:"80",color:"#2ABBE5"},{text:"90",color:"#1875B6"},{text:"100",color:"#133DB5"}]},{name:"风级",key:"wind-l",children:[{name:"静风",value:0,icon:"/wind-level/0.png"},{name:"1级风",value:1,icon:"/wind-level/1.png"},{name:"2级风",value:2,icon:"/wind-level/2.png"},{name:"3级风",value:3,icon:"/wind-level/3.png"},{name:"4级风",value:4,icon:"/wind-level/4.png"},{name:"5级风",value:5,icon:"/wind-level/5.png"},{name:"6级风",value:6,icon:"/wind-level/6.png"},{name:"7级风",value:7,icon:"/wind-level/7.png"},{name:"8级风",value:8,icon:"/wind-level/8.png"},{name:"9级风",value:9,icon:"/wind-level/9.png"},{name:"10级风",value:10,icon:"/wind-level/10.png"},{name:"11级风",value:11,icon:"/wind-level/11.png"},{name:"12级风",value:12,icon:"/wind-level/12.png"},{name:"13级风",value:13,icon:"/wind-level/13.png"},{name:"14级风",value:14,icon:"/wind-level/14.png"},{name:"15级风",value:15,icon:"/wind-level/15.png"},{name:"16级风",value:16,icon:"/wind-level/16.png"}]},{name:"5分钟累积降雨(mm)",key:"prep_5min",children:[{text:"0.4",color:"#BDF071"},{text:"1.0",color:"#4B7902"},{text:"2.0",color:"#1BB1F1"},{text:"5.0",color:"#0000FF"},{text:"10",color:"#EC808D"},{text:"",color:"#D900B6"}]},{name:"1小时降雨(mm)",key:"prep_1h",children:[{text:"<1.5",color:"#B8EF9E"},{text:"1.6-6.9",color:"#66B755"},{text:"7-14.9",color:"#7AB8F7"},{text:"15-39.9",color:"#8792FD"},{text:"40-49.9",color:"#E440EF"},{text:">50",color:"#74173F"}]},{name:"3小时降雨(mm)",key:"prep_3h",children:[{text:"<2.9",color:"#B8EF9E"},{text:"3-9.9",color:"#66B755"},{text:"10-19.9",color:"#7AB8F7"},{text:"20-49.9",color:"#8792FD"},{text:"50-69.9",color:"#E440EF"},{text:">70",color:"#74173F"}]},{name:"6小时降雨(mm)",key:"prep_6h",children:[{text:"<3.9",color:"#B8EF9E"},{text:"4-12.9",color:"#66B755"},{text:"13-24.9",color:"#7AB8F7"},{text:"25-59.9",color:"#8792FD"},{text:"60-119.9",color:"#E440EF"},{text:">120",color:"#74173F"}]},{name:"12小时降雨(mm)",key:"prep_12h",children:[{text:"<4.9",color:"#B8EF9E"},{text:"5-14.9",color:"#66B755"},{text:"15-29.9",color:"#7AB8F7"},{text:"30-69.9",color:"#8792FD"},{text:"70-139.9",color:"#E440EF"},{text:">140",color:"#74173F"}]},{name:"24小时降雨(mm)",key:"prep_24h",children:[{text:"<9.9",color:"#B8EF9E"},{text:"10-24.9",color:"#66B755"},{text:"25-49.9",color:"#7AB8F7"},{text:"50-99.9",color:"#8792FD"},{text:"100-250",color:"#E440EF"},{text:">250",color:"#74173F"}]},{name:"未来1小时降雨预报(mm)",key:"prep_f_1h",children:[{text:"<1.5",color:"#B8EF9E"},{text:"1.6-6.9",color:"#66B755"},{text:"7-14.9",color:"#7AB8F7"},{text:"15-39.9",color:"#8792FD"},{text:"40-49.9",color:"#E440EF"},{text:">50",color:"#74173F"}]},{name:"未来3小时降雨预报(mm)",key:"prep_f_3h",children:[{text:"<2.9",color:"#B8EF9E"},{text:"3-9.9",color:"#66B755"},{text:"10-19.9",color:"#7AB8F7"},{text:"20-49.9",color:"#8792FD"},{text:"50-69.9",color:"#E440EF"},{text:">70",color:"#74173F"}]},{name:"未来6小时降雨预报(mm)",key:"prep_f_6h",children:[{text:"<3.9",color:"#B8EF9E"},{text:"4-12.9",color:"#66B755"},{text:"13-24.9",color:"#7AB8F7"},{text:"25-59.9",color:"#8792FD"},{text:"60-119.9",color:"#E440EF"},{text:">120",color:"#74173F"}]},{name:"未来12小时降雨预报(mm)",key:"prep_f_12h",children:[{text:"<4.9",color:"#B8EF9E"},{text:"5-14.9",color:"#66B755"},{text:"15-29.9",color:"#7AB8F7"},{text:"30-69.9",color:"#8792FD"},{text:"70-139.9",color:"#E440EF"},{text:">140",color:"#74173F"}]},{name:"未来24小时降雨预报(mm)",key:"prep_f_24h",children:[{text:"<9.9",color:"#B8EF9E"},{text:"10-24.9",color:"#66B755"},{text:"25-49.9",color:"#7AB8F7"},{text:"50-99.9",color:"#8792FD"},{text:"100-250",color:"#E440EF"},{text:">250",color:"#74173F"}]}],p=(o,a)=>{const l=o.__vccOpts||o;for(const[c,n]of a)l[c]=n;return l},s={name:"legendIndex",props:{elements:{type:Array,required:!1}},setup(o,a){const l=e.reactive({factors:[]});e.watch(()=>o.elements,()=>{c.processData()},{deep:!0}),e.onMounted(()=>{c.processData()});const c={processData(){var n;(n=o.elements)!=null&&n.length?l.factors=x.filter(d=>o.elements.includes(d.key)):l.factors=x}};return{...c,...e.toRefs(l)}}},E={class:"legend-index"},B={key:0,class:"legend-group"},h={class:"legend-item"},D={class:"legend-name"},g={class:"legend-color"};function _(o,a,l,c,n,d){return e.openBlock(),e.createElementBlock("div",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.factors,r=>{var m;return e.openBlock(),e.createElementBlock(e.Fragment,{key:r.key},[(m=r==null?void 0:r.children)!=null&&m.length?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",h,[e.createElementVNode("div",D,e.toDisplayString(r.name),1),e.createElementVNode("div",g,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.children,(F,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,style:e.normalizeStyle({backgroundColor:F.color})},e.toDisplayString(F.text),5))),128))])])])):e.createCommentVNode("",!0)],64)}),128))])}const i=p(s,[["render",_]]);t.KtFactorLegend=i,t.default=i,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(o,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],e):(o=typeof globalThis<"u"?globalThis:o||self,e(o.KtFactorLegend={},o.Vue,o.ElementPlus))})(this,function(o,e,F){"use strict";const x=[{name:"积水深度(cm)",key:"waterDepth",children:[{text:"<10",color:"#70DFA6"},{text:"10-15",color:"#8ED6FD"},{text:"15-27",color:"#0098FA"},{text:"27-40",color:"#FDCC00"},{text:"40-60",color:"#F07E2C"},{text:">60",color:"#EA0000"}]},{name:"温度(℃)",key:"temp",children:[{text:"-30",color:"#1875B6"},{text:"-20",color:"#2ABBE5"},{text:"-10",color:"#D1F4F2"},{text:"0",color:"#CBE4BE"},{text:"10",color:"#B1D162"},{text:"20",color:"#D3DD52"},{text:"30",color:"#F0E94B"},{text:"40",color:"#E48529"},{text:"",color:"#E74526"}]},{name:"气压(hPa)",key:"pres",children:[{text:"948",color:"#DFF5FD"},{text:"964",color:"#AEE5FA"},{text:"981",color:"#76D6F8"},{text:"997",color:"#38C3F5"},{text:"1015",color:"#00B7F2"},{text:"1020",color:"#00AAF1"},{text:"1030",color:"#009CE2"},{text:"1040",color:"#0089CD"},{text:"1050",color:"#0078BA"},{text:"",color:"#0B599A"}]},{name:"湿度(%)",key:"rh",children:[{text:"10",color:"#E74526"},{text:"20",color:"#E48529"},{text:"30",color:"#F0E94B"},{text:"40",color:"#D3DD52"},{text:"50",color:"#B1D162"},{text:"60",color:"#CBE4BE"},{text:"70",color:"#D1F4F2"},{text:"80",color:"#2ABBE5"},{text:"90",color:"#1875B6"},{text:"100",color:"#133DB5"}]},{name:"风级",key:"wind-l",type:"icon",children:[{text:"静风",value:0,icon:"/wind-level/0.png"},{text:"1级风",value:1,icon:"/wind-level/1.png"},{text:"2级风",value:2,icon:"/wind-level/2.png"},{text:"3级风",value:3,icon:"/wind-level/3.png"},{text:"4级风",value:4,icon:"/wind-level/4.png"},{text:"5级风",value:5,icon:"/wind-level/5.png"},{text:"6级风",value:6,icon:"/wind-level/6.png"},{text:"7级风",value:7,icon:"/wind-level/7.png"},{text:"8级风",value:8,icon:"/wind-level/8.png"},{text:"9级风",value:9,icon:"/wind-level/9.png"},{text:"10级风",value:10,icon:"/wind-level/10.png"},{text:"11级风",value:11,icon:"/wind-level/11.png"},{text:"12级风",value:12,icon:"/wind-level/12.png"},{text:"13级风",value:13,icon:"/wind-level/13.png"},{text:"14级风",value:14,icon:"/wind-level/14.png"},{text:"15级风",value:15,icon:"/wind-level/15.png"},{text:"16级风",value:16,icon:"/wind-level/16.png"}]},{name:"5分钟累积降雨(mm)",key:"prep_5min",children:[{text:"0.4",color:"#BDF071"},{text:"1.0",color:"#4B7902"},{text:"2.0",color:"#1BB1F1"},{text:"5.0",color:"#0000FF"},{text:"10",color:"#EC808D"},{text:"",color:"#D900B6"}]},{name:"1小时降雨(mm)",key:"prep_1h",children:[{text:"<1.5",color:"#B8EF9E"},{text:"1.6-6.9",color:"#66B755"},{text:"7-14.9",color:"#7AB8F7"},{text:"15-39.9",color:"#8792FD"},{text:"40-49.9",color:"#E440EF"},{text:">50",color:"#74173F"}]},{name:"3小时降雨(mm)",key:"prep_3h",children:[{text:"<2.9",color:"#B8EF9E"},{text:"3-9.9",color:"#66B755"},{text:"10-19.9",color:"#7AB8F7"},{text:"20-49.9",color:"#8792FD"},{text:"50-69.9",color:"#E440EF"},{text:">70",color:"#74173F"}]},{name:"6小时降雨(mm)",key:"prep_6h",children:[{text:"<3.9",color:"#B8EF9E"},{text:"4-12.9",color:"#66B755"},{text:"13-24.9",color:"#7AB8F7"},{text:"25-59.9",color:"#8792FD"},{text:"60-119.9",color:"#E440EF"},{text:">120",color:"#74173F"}]},{name:"12小时降雨(mm)",key:"prep_12h",children:[{text:"<4.9",color:"#B8EF9E"},{text:"5-14.9",color:"#66B755"},{text:"15-29.9",color:"#7AB8F7"},{text:"30-69.9",color:"#8792FD"},{text:"70-139.9",color:"#E440EF"},{text:">140",color:"#74173F"}]},{name:"24小时降雨(mm)",key:"prep_24h",children:[{text:"<9.9",color:"#B8EF9E"},{text:"10-24.9",color:"#66B755"},{text:"25-49.9",color:"#7AB8F7"},{text:"50-99.9",color:"#8792FD"},{text:"100-250",color:"#E440EF"},{text:">250",color:"#74173F"}]},{name:"未来1小时降雨预报(mm)",key:"prep_f_1h",children:[{text:"<1.5",color:"#B8EF9E"},{text:"1.6-6.9",color:"#66B755"},{text:"7-14.9",color:"#7AB8F7"},{text:"15-39.9",color:"#8792FD"},{text:"40-49.9",color:"#E440EF"},{text:">50",color:"#74173F"}]},{name:"未来3小时降雨预报(mm)",key:"prep_f_3h",children:[{text:"<2.9",color:"#B8EF9E"},{text:"3-9.9",color:"#66B755"},{text:"10-19.9",color:"#7AB8F7"},{text:"20-49.9",color:"#8792FD"},{text:"50-69.9",color:"#E440EF"},{text:">70",color:"#74173F"}]},{name:"未来6小时降雨预报(mm)",key:"prep_f_6h",children:[{text:"<3.9",color:"#B8EF9E"},{text:"4-12.9",color:"#66B755"},{text:"13-24.9",color:"#7AB8F7"},{text:"25-59.9",color:"#8792FD"},{text:"60-119.9",color:"#E440EF"},{text:">120",color:"#74173F"}]},{name:"未来12小时降雨预报(mm)",key:"prep_f_12h",children:[{text:"<4.9",color:"#B8EF9E"},{text:"5-14.9",color:"#66B755"},{text:"15-29.9",color:"#7AB8F7"},{text:"30-69.9",color:"#8792FD"},{text:"70-139.9",color:"#E440EF"},{text:">140",color:"#74173F"}]},{name:"未来24小时降雨预报(mm)",key:"prep_f_24h",children:[{text:"<9.9",color:"#B8EF9E"},{text:"10-24.9",color:"#66B755"},{text:"25-49.9",color:"#7AB8F7"},{text:"50-99.9",color:"#8792FD"},{text:"100-250",color:"#E440EF"},{text:">250",color:"#74173F"}]}],h=(l,i)=>{const r=l.__vccOpts||l;for(const[n,a]of i)r[n]=a;return r},E={name:"legendIndex",props:{elements:{type:Array,required:!1},dark:{type:Boolean,required:!1}},setup(l,i){const r=e.reactive({factors:[]});e.watch(()=>l.elements,()=>{n.processData()},{deep:!0}),e.onMounted(()=>{n.processData()});const n={processData(){var a;(a=l.elements)!=null&&a.length?r.factors=x.filter(p=>l.elements.includes(p.key)):r.factors=x}};return{...n,...e.toRefs(r)}}},B={class:"legend-item"},g={class:"legend-name"},k={key:0,class:"legend-image"},f=["src","alt"],D={class:"text"},u={key:1,class:"legend-color"},y={class:"text"};function _(l,i,r,n,a,p){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["legend-index",{dark:r.dark}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.factors,t=>{var m;return e.openBlock(),e.createElementBlock(e.Fragment,{key:t.key},[(m=t==null?void 0:t.children)!=null&&m.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["legend-group",t.key])},[e.createElementVNode("div",B,[e.createElementVNode("div",g,e.toDisplayString(t.name),1),t.type=="icon"?(e.openBlock(),e.createElementBlock("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.children,(c,s)=>(e.openBlock(),e.createElementBlock("div",{key:s},[e.createElementVNode("img",{src:c.icon,alt:c.text},null,8,f),e.createElementVNode("div",D,e.toDisplayString(c.text),1)]))),128))])):(e.openBlock(),e.createElementBlock("div",u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.children,(c,s)=>(e.openBlock(),e.createElementBlock("div",{key:s},[e.createElementVNode("div",{class:"bar",style:e.normalizeStyle({backgroundColor:c.color})},null,4),e.createElementVNode("div",y,e.toDisplayString(c.text),1)]))),128))]))])],2)):e.createCommentVNode("",!0)],64)}),128))],2)}const d=h(E,[["render",_]]);var w={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};e.createApp(d).use(F,{locale:w}).mount("#app"),o.KtFactorLegend=d,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});