新增点击地点标点,弹出地点信息弹窗功能
parent
eed0aa1d50
commit
746fea5bc6
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue