From 4c20089472b20319746649decbce3a11f16cb6a0 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期五, 07 二月 2025 18:43:24 +0800 Subject: [PATCH] 切换主题,自身设置颜色、大小 --- src/components/chat/chatComponents/mapCom/MapCom.vue | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/chat/chatComponents/mapCom/MapCom.vue b/src/components/chat/chatComponents/mapCom/MapCom.vue index 92306d4..299b2c7 100644 --- a/src/components/chat/chatComponents/mapCom/MapCom.vue +++ b/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"> -- Gitblit v1.9.3