From 746fea5bc69738bd55f1d0536cc3e7036db04cd8 Mon Sep 17 00:00:00 2001 From: qubiaobiao <3294694717@qq.com> Date: Mon, 4 Mar 2024 16:51:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=82=B9=E5=87=BB=E5=9C=B0?= =?UTF-8?q?=E7=82=B9=E6=A0=87=E7=82=B9=EF=BC=8C=E5=BC=B9=E5=87=BA=E5=9C=B0?= =?UTF-8?q?=E7=82=B9=E4=BF=A1=E6=81=AF=E5=BC=B9=E7=AA=97=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LandMarkShow.vue | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/components/LandMarkShow.vue b/src/components/LandMarkShow.vue index a780330..014e966 100644 --- a/src/components/LandMarkShow.vue +++ b/src/components/LandMarkShow.vue @@ -49,20 +49,14 @@ const judgmentDown = ref("dispaly:none;"); const adaptive = (imgId) => { let newImg; - let describesBox; - let brieflyBox; setTimeout(() => { newImg = document.getElementById(imgId); - describesBox = document.getElementById("describesBox"); - brieflyBox = document.getElementById("brieflyBox"); }, 5); setTimeout(() => { let newWidth = window.getComputedStyle(newImg, null)["width"]; let newMargin = window.getComputedStyle(newImg, null).marginLeft; - describesBox.style.width = newWidth; - describesBox.style.left = newMargin; - brieflyBox.style.width = newWidth; - brieflyBox.style.left = newMargin; + describesShow.value = `width:${newWidth};left:${newMargin};${judgmentDown.value}`; + brieflyShow.value = `width:${newWidth};left:${newMargin};${judgmentUp.value}`; }, 10); } @@ -73,24 +67,18 @@ watch(() => LandMarkShow.boxShow, (newValue, oldValue) => { watch(() => LandMarkShow.information.landImgUrl, (newValue, oldValue) => { nowId.value = 1; nowImg.value = `${LandMarkShow.information.landImgUrl}${nowId.value}.jpg`; - describesShow.value = "display:none;"; - brieflyShow.value = "display:block;"; judgmentUp.value = "display:block;"; judgmentDown.value = "display:none;"; adaptive(nowId.value); }) const up = () => { - describesShow.value = "display:block;"; - brieflyShow.value = "display:none;"; judgmentUp.value = "display:none;"; judgmentDown.value = "display:block;"; adaptive(nowId.value); } const down = () => { - describesShow.value = "display:none;"; - brieflyShow.value = "display:block;"; judgmentUp.value = "display:block;"; judgmentDown.value = "display:none;"; adaptive(nowId.value);