wujingjing
2025-02-07 4c20089472b20319746649decbce3a11f16cb6a0
src/components/chat/chatComponents/mapCom/MapCom.vue
@@ -7,11 +7,11 @@
            @click="toggleShowChart"
         >
            <div
               class="ywicon -rotate-90 text-white !text-[13px]"
               :class="{ 'icon-zuoyoujiantou': chartIsShow, 'icon-zuoyoujiantou1': !chartIsShow }"
               class="ywifont -rotate-90 text-white !text-[13px]"
               :class="{ 'ywicon-zuoyoujiantou': chartIsShow, 'ywicon-zuoyoujiantou1': !chartIsShow }"
            ></div>
         </div>
         <RecordSet v-if="chartIsShow" :data="CHART_DATA" class="h-[23vh] mt-2" />
         <RecordSet v-if="chartIsShow" chartHeight="23vh" :data="CHART_DATA" class="mt-2" />
      </div>
   </div>
</template>
@@ -32,9 +32,9 @@
   data: MapData;
};
const createInfoWindow = () => {
   const dom = `<div class="bg-white p-1 flex flex-col border-blue-500 border-solid border">
         <div class="pointer-title bg-[#ca0dab] flex-center py-1 text-white px-5">
   const dom = `<div class="w-48 bg-white p-1 flex flex-col border-blue-500 border-solid border">
         <div class="bg-[#ca0dab] flex py-1 text-white px-5">
            <div class="pointer-title  text-nowrap overflow-hidden text-ellipsis mx-auto"></div>
         </div>
      
      </div>`;
@@ -61,7 +61,7 @@
const updateInfoWindow = (title: string) => {
   const pointerTitle = infoWindow.dom.querySelector('.pointer-title');
   pointerTitle.innerHTML = title;
   pointerTitle.innerHTML = title +'';
};
const addMarkerLayer = () => {
@@ -117,9 +117,10 @@
   addMarkerLayer();
   infoWindow = new AMap.InfoWindow({
      content: createInfoWindow(),
      offset: new AMap.Pixel(0, -18),
      offset: [3,-34],
      closeWhenClickMap: true,
   });
});
</script>
<style scoped lang="scss">