diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index fec82ee..db6c6da 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -116,7 +116,7 @@ var T = window.T; const dropdown = reactive({ value1: 0, - hinegh: 0, + hinegh: 256, value1: 0, value2: 0, value3: 0, @@ -275,7 +275,6 @@ const init = () => { map = new T.Map("mapDiv"); // map.setMapType(window.TMAP_SATELLITE_MAP); map.centerAndZoom(new T.LngLat(121.88356, 29.45144), 13); - dropdown.hinegh = document.body.clientHeight * 0.45; control = new T.Control.Zoom(); //添加缩放平移控件 map.addControl(control); @@ -295,7 +294,12 @@ const yxfwxz = (e) => { list.index = e.id; }; const mousedown = (event) => { - if (document.body.clientHeight - event.touches[0].clientY >= 256) { + if ( + document.body.clientHeight - event.touches[0].clientY >= 256 && + document.body.clientHeight - event.touches[0].clientY <= + document.body.clientHeight + ) { + console.log(event.touches[0].clientY); dropdown.hinegh = document.body.clientHeight - event.touches[0].clientY; } }; @@ -489,7 +493,7 @@ onMounted(() => { border-radius: 6px 6px 6px 6px; opacity: 1; border: 1px solid #eaeaea; - margin: 10px auto 0; + margin: 10px auto 3px; background-color: #eaeaea; }