Showing
1 changed file
with
18 additions
and
9 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-05-19 14:54:27 | 2 | * @Date: 2023-05-19 14:54:27 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-06-02 16:03:29 | 4 | + * @LastEditTime: 2023-06-02 17:37:17 |
| 5 | * @FilePath: /map-demo/src/views/index.vue | 5 | * @FilePath: /map-demo/src/views/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -13,8 +13,8 @@ | ... | @@ -13,8 +13,8 @@ |
| 13 | style="display: flex; overflow-x: scroll; overflow-y: hidden; -webkit-overflow-scrolling: touch; position: relative;"> | 13 | style="display: flex; overflow-x: scroll; overflow-y: hidden; -webkit-overflow-scrolling: touch; position: relative;"> |
| 14 | <div v-for="(item, index) in navBarList" :key="index" style="width: 30%; flex-shrink: 0; padding-top: 1rem;" :class="[isActive === index ? 'checked' : '', 'item']" | 14 | <div v-for="(item, index) in navBarList" :key="index" style="width: 30%; flex-shrink: 0; padding-top: 1rem;" :class="[isActive === index ? 'checked' : '', 'item']" |
| 15 | @click="setNavLayer(item, index)"> | 15 | @click="setNavLayer(item, index)"> |
| 16 | - <van-icon name="shop-o" size="1.25rem" /><br /> | 16 | + <van-icon name="shop-o" size="1.5rem" /><br /> |
| 17 | - <span style="font-size: 0.85rem;">{{ item.name }}</span> | 17 | + <span style="font-size: 0.85rem; margin-top: 0.5rem; display: inline-block;">{{ item.name }}</span> |
| 18 | </div> | 18 | </div> |
| 19 | <div style="width: 4rem;flex-shrink: 0;"></div> | 19 | <div style="width: 4rem;flex-shrink: 0;"></div> |
| 20 | <div style="position: fixed; right: 0; background-color: white; height: 4.5rem; width: 4rem;"> | 20 | <div style="position: fixed; right: 0; background-color: white; height: 4.5rem; width: 4rem;"> |
| ... | @@ -727,7 +727,7 @@ export default { | ... | @@ -727,7 +727,7 @@ export default { |
| 727 | setTitleLayer() { | 727 | setTitleLayer() { |
| 728 | var layer = new AMap.TileLayer.Flexible({ | 728 | var layer = new AMap.TileLayer.Flexible({ |
| 729 | cacheSize: 50, | 729 | cacheSize: 50, |
| 730 | - opacity: 0.5, | 730 | + opacity: 1, |
| 731 | zIndex: 100, | 731 | zIndex: 100, |
| 732 | createTile: function (x, y, z, success, fail) { | 732 | createTile: function (x, y, z, success, fail) { |
| 733 | if (z === 17) { | 733 | if (z === 17) { |
| ... | @@ -856,7 +856,11 @@ export default { | ... | @@ -856,7 +856,11 @@ export default { |
| 856 | console.warn(text); | 856 | console.warn(text); |
| 857 | // 点击空白处 关闭弹框 | 857 | // 点击空白处 关闭弹框 |
| 858 | if (this.showInfoWindow) { | 858 | if (this.showInfoWindow) { |
| 859 | - this.$refs['infoWindow'].close() | 859 | + this.$refs['infoWindow'].close(); |
| 860 | + // 打开缩放 | ||
| 861 | + this.map.setStatus({ | ||
| 862 | + zoomEnable: true | ||
| 863 | + }); | ||
| 860 | } | 864 | } |
| 861 | }, | 865 | }, |
| 862 | setWalkRoute() { | 866 | setWalkRoute() { |
| ... | @@ -917,6 +921,10 @@ export default { | ... | @@ -917,6 +921,10 @@ export default { |
| 917 | this.map.setZoomAndCenter(this.zoom, position); | 921 | this.map.setZoomAndCenter(this.zoom, position); |
| 918 | // | 922 | // |
| 919 | this.show_nav_popup = false; | 923 | this.show_nav_popup = false; |
| 924 | + // 禁止缩放 | ||
| 925 | + this.map.setStatus({ | ||
| 926 | + zoomEnable: false | ||
| 927 | + }); | ||
| 920 | }, | 928 | }, |
| 921 | setInfoWindows(position) { | 929 | setInfoWindows(position) { |
| 922 | // 此时需要把组件的样式设置为可见 | 930 | // 此时需要把组件的样式设置为可见 |
| ... | @@ -1002,15 +1010,16 @@ export default { | ... | @@ -1002,15 +1010,16 @@ export default { |
| 1002 | width: 100%; | 1010 | width: 100%; |
| 1003 | background-color: white; | 1011 | background-color: white; |
| 1004 | text-align: center; | 1012 | text-align: center; |
| 1005 | - box-shadow: 0 2px 2px rgba(0, 0, 0, .2); | 1013 | + box-shadow: 0 -1px 0 rgba(80, 80, 80, 0.1); |
| 1006 | z-index: 999; | 1014 | z-index: 999; |
| 1007 | - | 1015 | + padding: 0.5rem 0; |
| 1008 | .item { | 1016 | .item { |
| 1009 | padding-top: 0.5rem; | 1017 | padding-top: 0.5rem; |
| 1018 | + color: #888; | ||
| 1010 | } | 1019 | } |
| 1011 | 1020 | ||
| 1012 | .checked { | 1021 | .checked { |
| 1013 | - color: red; | 1022 | + color: #965f13; |
| 1014 | } | 1023 | } |
| 1015 | } | 1024 | } |
| 1016 | 1025 | ||
| ... | @@ -1024,7 +1033,7 @@ export default { | ... | @@ -1024,7 +1033,7 @@ export default { |
| 1024 | .operate-bar-wrapper { | 1033 | .operate-bar-wrapper { |
| 1025 | position: absolute; | 1034 | position: absolute; |
| 1026 | right: 20px; | 1035 | right: 20px; |
| 1027 | - top: 10%; | 1036 | + top: 5%; |
| 1028 | width: 20px; | 1037 | width: 20px; |
| 1029 | height: auto; | 1038 | height: auto; |
| 1030 | z-index: 100; | 1039 | z-index: 100; | ... | ... |
-
Please register or login to post a comment