hookehuyr

fix

<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-06-02 16:03:29
* @LastEditTime: 2023-06-02 17:37:17
* @FilePath: /map-demo/src/views/index.vue
* @Description: 文件描述
-->
......@@ -13,8 +13,8 @@
style="display: flex; overflow-x: scroll; overflow-y: hidden; -webkit-overflow-scrolling: touch; position: relative;">
<div v-for="(item, index) in navBarList" :key="index" style="width: 30%; flex-shrink: 0; padding-top: 1rem;" :class="[isActive === index ? 'checked' : '', 'item']"
@click="setNavLayer(item, index)">
<van-icon name="shop-o" size="1.25rem" /><br />
<span style="font-size: 0.85rem;">{{ item.name }}</span>
<van-icon name="shop-o" size="1.5rem" /><br />
<span style="font-size: 0.85rem; margin-top: 0.5rem; display: inline-block;">{{ item.name }}</span>
</div>
<div style="width: 4rem;flex-shrink: 0;"></div>
<div style="position: fixed; right: 0; background-color: white; height: 4.5rem; width: 4rem;">
......@@ -727,7 +727,7 @@ export default {
setTitleLayer() {
var layer = new AMap.TileLayer.Flexible({
cacheSize: 50,
opacity: 0.5,
opacity: 1,
zIndex: 100,
createTile: function (x, y, z, success, fail) {
if (z === 17) {
......@@ -856,7 +856,11 @@ export default {
console.warn(text);
// 点击空白处 关闭弹框
if (this.showInfoWindow) {
this.$refs['infoWindow'].close()
this.$refs['infoWindow'].close();
// 打开缩放
this.map.setStatus({
zoomEnable: true
});
}
},
setWalkRoute() {
......@@ -917,6 +921,10 @@ export default {
this.map.setZoomAndCenter(this.zoom, position);
//
this.show_nav_popup = false;
// 禁止缩放
this.map.setStatus({
zoomEnable: false
});
},
setInfoWindows(position) {
// 此时需要把组件的样式设置为可见
......@@ -1002,15 +1010,16 @@ export default {
width: 100%;
background-color: white;
text-align: center;
box-shadow: 0 2px 2px rgba(0, 0, 0, .2);
box-shadow: 0 -1px 0 rgba(80, 80, 80, 0.1);
z-index: 999;
padding: 0.5rem 0;
.item {
padding-top: 0.5rem;
color: #888;
}
.checked {
color: red;
color: #965f13;
}
}
......@@ -1024,7 +1033,7 @@ export default {
.operate-bar-wrapper {
position: absolute;
right: 20px;
top: 10%;
top: 5%;
width: 20px;
height: auto;
z-index: 100;
......