This commit is contained in:
汪汇 2023-12-08 13:53:17 +08:00
parent 8b352ad764
commit b7c992dd7f
1 changed files with 28 additions and 2 deletions

View File

@ -29,9 +29,12 @@
:overlay="false" :overlay="false"
round round
position="bottom" position="bottom"
:style="{ height: '45%' }" :style="{ height: dropdown.hinegh + 'px' }"
style="z-index: 10" style="z-index: 10"
> >
<div style="width: 100%" @touchmove="mousedown">
<div class="tzhz"></div>
</div>
<van-sticky style="background-color: #fff; z-index: 99"> <van-sticky style="background-color: #fff; z-index: 99">
<van-search <van-search
v-model="value" v-model="value"
@ -112,6 +115,8 @@ var control = null;
var T = window.T; var T = window.T;
const dropdown = reactive({ const dropdown = reactive({
value1: 0,
hinegh: 0,
value1: 0, value1: 0,
value2: 0, value2: 0,
value3: 0, value3: 0,
@ -270,6 +275,12 @@ const init = () => {
map = new T.Map("mapDiv"); map = new T.Map("mapDiv");
// map.setMapType(window.TMAP_SATELLITE_MAP); // map.setMapType(window.TMAP_SATELLITE_MAP);
map.centerAndZoom(new T.LngLat(121.88356, 29.45144), 13); map.centerAndZoom(new T.LngLat(121.88356, 29.45144), 13);
dropdown.hinegh = document.body.clientHeight * 0.45;
setTimeout(() => {
dropdown.hinegh = dropdown.hinegh + 300;
console.log(dropdown.hinegh);
}, 2000);
control = new T.Control.Zoom(); control = new T.Control.Zoom();
// //
map.addControl(control); map.addControl(control);
@ -288,6 +299,12 @@ const init = () => {
const yxfwxz = (e) => { const yxfwxz = (e) => {
list.index = e.id; list.index = e.id;
}; };
const mousedown = (event) => {
if (document.body.clientHeight - event.touches[0].clientY >= 256) {
dropdown.hinegh = document.body.clientHeight - event.touches[0].clientY;
}
};
const yxf = () => { const yxf = () => {
dropdown.rmyy.forEach((item, index) => { dropdown.rmyy.forEach((item, index) => {
var icons = new T.Icon({ var icons = new T.Icon({
@ -394,7 +411,7 @@ onMounted(() => {
} }
.card { .card {
width: 100%; width: 100%;
height: calc(100% - 102px); height: calc(100% - 122px);
overflow: auto; overflow: auto;
padding-bottom: 80px; padding-bottom: 80px;
.cardlist { .cardlist {
@ -471,4 +488,13 @@ onMounted(() => {
box-shadow: 0 0px 0px rgba(100, 101, 102, 0.12); box-shadow: 0 0px 0px rgba(100, 101, 102, 0.12);
border-bottom: 1px solid #f1f1f1; border-bottom: 1px solid #f1f1f1;
} }
.tzhz {
width: 100px;
height: 6px;
border-radius: 6px 6px 6px 6px;
opacity: 1;
border: 1px solid #eaeaea;
margin: 10px auto 0;
background-color: #eaeaea;
}
</style> </style>