Browse Source

fix: 图例显示

lxf 1 tuần trước cách đây
mục cha
commit
f0fe46dad8

+ 4 - 4
src/components/static_map_change/pointLayer.js

@@ -114,22 +114,22 @@ class pointLayer {
       {
         id: 15,
         wkt: "POINT(114.11268311515018 22.798460027777903)",
-        url: "12",
+        url: "11",
       },
       {
         id: 16,
         wkt: "POINT(114.05651386146741 23.037999028530084)",
-        url: "13",
+        url: "8",
       },
       {
         id: 17,
         wkt: "POINT(114.17227806707119 22.939720069860023)",
-        url: "17",
+        url: "6",
       },
       {
         id: 18,
         wkt: "POINT(114.04566097876406 22.939117134870983)",
-        url: "18",
+        url: "0",
       },
     ]
     point.map((item) => {

+ 1 - 1
src/views/warningHome/components/legend.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="land-use-legend yes-events">
+    <div class="land-use-legend yes-events" v-show="legendData && legendData.length > 0">
         <div
             v-for="item in legendData"
             :key="item.id"

+ 2 - 0
src/views/warningHome/index.vue

@@ -88,6 +88,8 @@ const handleBaseTabClick = (tab) => {
         nextTick(() => {
             getLegendData(legendKey);
         });
+    } else {
+        legendRef.value && legendRef.value.updateData([]);
     }
     activeBaseTab.value = tab;
     staticMapPointLayers.hidePoint()