From 20d6664273b55c0c7a625702008b3769920ba4c4 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期一, 29 七月 2024 10:10:04 +0800 Subject: [PATCH] 地图调整 --- src/components/chat/chatComponents/mapCom/MapCom.vue | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/chat/chatComponents/mapCom/MapCom.vue b/src/components/chat/chatComponents/mapCom/MapCom.vue index 92306d4..dac3d20 100644 --- a/src/components/chat/chatComponents/mapCom/MapCom.vue +++ b/src/components/chat/chatComponents/mapCom/MapCom.vue @@ -11,7 +11,7 @@ :class="{ 'icon-zuoyoujiantou': chartIsShow, 'icon-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"> -- Gitblit v1.9.3