刘嘉威
2022-10-25 50cd9f6356fdf511908c33e9a085ae7a54501082
src/views/index/center-map.vue
@@ -6,7 +6,7 @@
import type { MapdataType } from "./center.map";
const option = ref({});
const code = ref("china"); //china 代表中国 其他地市是行政编码
const centerMapRef = ref();
withDefaults(
  defineProps<{
    // 结束数值
@@ -36,7 +36,6 @@
    }
  });
  await nextTick();
  centerMapRef.value?.resize();
  option.value = optionHandle(regionCode, list, mapData);
};
@@ -56,7 +55,7 @@
      mapjson = mapjson.geoJSON;
      resolve(mapjson);
    } else {
      mapjson = await GETNOBASE(`/map-geojson/${regionCode}.json`).then(
      mapjson = await GETNOBASE(`map-geojson/${regionCode}.json`).then(
        (data) => data
      );
      code.value=regionCode
@@ -98,6 +97,7 @@
        :option="option"
        ref="centerMapRef"
        @click="mapClick"
        v-if="JSON.stringify(option)!='{}'"
      />
    </div>
  </div>
@@ -147,7 +147,7 @@
  }
  .mapwrap {
    height: 548px;
    height: 580px;
    width: 100%;
    // padding: 0 0 10px 0;
    box-sizing: border-box;