安琪酵母(西藏)益生菌信息采集中心智能实验室
longyvfengyun
2023-06-30 09ab26b8df36c5ebd7cfc20a862011fb98681588
src/views/home/index.vue
@@ -1,9 +1,11 @@
<script setup>
import {onMounted, onUnmounted, watch} from "vue";
import {onMounted, onUnmounted, ref, watch} from "vue";
import MapPin from "@/components/MapPin.vue";
import slideMenu from "@/views/mainLayout/js/slideMenu";
import homeContentModule from "@/views/home/js/homeContentModule";
import homeInfoModule from "@/views/home/js/homeInfoModule";
const isShowMapPin = ref(true);
const {
   isCollapse
@@ -19,7 +21,9 @@
const {homeInfo} = homeInfoModule();
watch(isCollapse, ()=>{
   isShowMapPin.value = false;
   setTimeout(()=>{
      isShowMapPin.value = true;
      setContainerSize();
   }, 500);
});
@@ -40,12 +44,14 @@
<template>
   <div class="home-content" ref="homeContentDom">
      <map-pin
         v-if="isShowMapPin"
         v-for="(item, index) in homeInfo" :key="'key'+index"
         :visible="item.pos.visible"
         :name="item.name"
         :c-width="cWidth" :c-height="cHeight"
         :d-width="dWidth" :d-height="dHeight"
         :x="item.pos.x" :y="item.pos.y"></map-pin>
         :x="item.pos.x" :y="item.pos.y"
         :info="item.info"></map-pin>
      <div class="card-box-list">
      </div>