hookehuyr

样式调整

...@@ -12,8 +12,12 @@ declare module '@vue/runtime-core' { ...@@ -12,8 +12,12 @@ declare module '@vue/runtime-core' {
12 InfoWindow: typeof import('./src/components/InfoWindow.vue')['default'] 12 InfoWindow: typeof import('./src/components/InfoWindow.vue')['default']
13 RouterLink: typeof import('vue-router')['RouterLink'] 13 RouterLink: typeof import('vue-router')['RouterLink']
14 RouterView: typeof import('vue-router')['RouterView'] 14 RouterView: typeof import('vue-router')['RouterView']
15 + VanCol: typeof import('vant/es')['Col']
15 VanDialog: typeof import('vant/es')['Dialog'] 16 VanDialog: typeof import('vant/es')['Dialog']
16 VanIcon: typeof import('vant/es')['Icon'] 17 VanIcon: typeof import('vant/es')['Icon']
17 VanPopup: typeof import('vant/es')['Popup'] 18 VanPopup: typeof import('vant/es')['Popup']
19 + VanRow: typeof import('vant/es')['Row']
20 + VanTab: typeof import('vant/es')['Tab']
21 + VanTabs: typeof import('vant/es')['Tabs']
18 } 22 }
19 } 23 }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 <div class="info-window-wrapper"> 3 <div class="info-window-wrapper">
4 <div :style="{ width: (widow_info.width * 0.8) + 'px', overflow: 'auto' }"> 4 <div :style="{ width: (widow_info.width * 0.8) + 'px', overflow: 'auto' }">
5 <div class="hideScrollBar info-window-title"> 5 <div class="hideScrollBar info-window-title">
6 - <div v-for="(item, index) in info.details" :key="index" @click="handleTitle(index)" 6 + <div v-for="(item, index) in info?.details" :key="index" @click="handleTitle(index)"
7 :class="[isActive === index ? 'checked' : '', 'item']"> 7 :class="[isActive === index ? 'checked' : '', 'item']">
8 <span>{{ item.name }}</span> 8 <span>{{ item.name }}</span>
9 </div> 9 </div>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 <van-icon v-if="!nav_scroll" name="arrow" color="#888" size="1.25rem" style="vertical-align: sub;" /> 12 <van-icon v-if="!nav_scroll" name="arrow" color="#888" size="1.25rem" style="vertical-align: sub;" />
13 <van-icon v-else name="arrow-left" color="#888" size="1.25rem" style="vertical-align: sub;" /> 13 <van-icon v-else name="arrow-left" color="#888" size="1.25rem" style="vertical-align: sub;" />
14 </div> 14 </div>
15 - <div v-for="(item, index) in info.details" :key="index"> 15 + <div v-for="(item, index) in info?.details" :key="index">
16 <div v-if="isActive === index" :class=" [item.audio ? 'info-text-audio' : 'info-text', 'van-multi-ellipsis--l3'] ">{{ item.note }}</div> 16 <div v-if="isActive === index" :class=" [item.audio ? 'info-text-audio' : 'info-text', 'van-multi-ellipsis--l3'] ">{{ item.note }}</div>
17 <div v-if="isActive === index && item.audio" class="info-control"> 17 <div v-if="isActive === index && item.audio" class="info-control">
18 <div v-if="!is_play" @click="play()" class="control-play"> 18 <div v-if="!is_play" @click="play()" class="control-play">
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
89 infoWindow(val) { 89 infoWindow(val) {
90 if (val) { 90 if (val) {
91 // 加载录音 91 // 加载录音
92 - this.audio.src = this.info.details[this.isActive]['audio']; 92 + this.audio.src = this.info?.details[this.isActive]['audio'];
93 let play_status = this.audio.play() // 播放 93 let play_status = this.audio.play() // 播放
94 if (play_status) { 94 if (play_status) {
95 play_status.then(() => { 95 play_status.then(() => {
...@@ -374,7 +374,7 @@ export default { ...@@ -374,7 +374,7 @@ export default {
374 width: 33.333%; 374 width: 33.333%;
375 flex-shrink: 0; 375 flex-shrink: 0;
376 color: #888; 376 color: #888;
377 - font-size: 1.2rem; 377 + font-size: 1.1rem;
378 margin-bottom: 0.75rem; 378 margin-bottom: 0.75rem;
379 display: inline-block; 379 display: inline-block;
380 } 380 }
......
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-05 16:47:36 4 + * @LastEditTime: 2023-06-06 14:45:27
5 * @FilePath: /map-demo/src/views/index.vue 5 * @FilePath: /map-demo/src/views/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
9 <div ref="root" style="height: 100vh; position: relative; overflow: hidden;"> 9 <div ref="root" style="height: 100vh; position: relative; overflow: hidden;">
10 <div id="container"></div> 10 <div id="container"></div>
11 <div class="nav-bar-wrapper"> 11 <div class="nav-bar-wrapper">
12 - <div class="hideScrollBar" style="display: flex; overflow-x: scroll; overflow-y: hidden; -webkit-overflow-scrolling: touch; position: relative;"> 12 + <div class="hideScrollBar nav-bar-content">
13 - <div v-for="(item, index) in navBarList" :key="index" style="width: 30%; flex-shrink: 0; padding-top: 1rem;" :class="[isActive === index ? 'checked' : '', 'item']" 13 + <div v-for="(item, index) in navBarList" :key="index" :class="[isActive === index ? 'checked' : '', 'item']"
14 @click="setNavLayer(item, index)"> 14 @click="setNavLayer(item, index)">
15 <van-icon name="shop-o" size="1.5rem" /><br /> 15 <van-icon name="shop-o" size="1.5rem" /><br />
16 <span style="font-size: 0.85rem; margin-top: 0.5rem; display: inline-block;">{{ item.name }}</span> 16 <span style="font-size: 0.85rem; margin-top: 0.5rem; display: inline-block;">{{ item.name }}</span>
...@@ -47,24 +47,19 @@ ...@@ -47,24 +47,19 @@
47 <div class="operate-bar-wrapper"> 47 <div class="operate-bar-wrapper">
48 <div class="box-wrapper"> 48 <div class="box-wrapper">
49 <div class="item" @click="setLocation"> 49 <div class="item" @click="setLocation">
50 - <i class="fa fa-crosshairs"></i><br /> 50 + <van-icon name="https://cdn.ipadbiz.cn/xys/map/%E5%AE%9A%E4%BD%8Dloc@2x.png" size="1.5rem" style="vertical-align: middle;" />
51 - 定位
52 </div> 51 </div>
53 <div v-if="show_walk_route" class="item" @click="setWalkRoute"> 52 <div v-if="show_walk_route" class="item" @click="setWalkRoute">
54 - <i class="fa fa-eye"></i><br /> 53 + <van-icon name="https://cdn.ipadbiz.cn/xys/map/%E7%BA%BF%E8%B7%AF@2x.png" size="1.25rem" style="vertical-align: middle;" />
55 - 步行
56 </div> 54 </div>
57 <div v-else class="item" @click="removeWalkRoute"> 55 <div v-else class="item" @click="removeWalkRoute">
58 - <i class="fa fa-eye-slash"></i><br /> 56 + <van-icon name="https://cdn.ipadbiz.cn/xys/map/%E7%BA%BF%E8%B7%AF@2x.png" size="1.25rem" style="vertical-align: middle;" />
59 - 步行
60 </div> 57 </div>
61 <div v-if="open_safe_route" class="item" @click="handleSafeRoute(true)"> 58 <div v-if="open_safe_route" class="item" @click="handleSafeRoute(true)">
62 - <i class="fa fa-eye"></i><br /> 59 + <van-icon name="https://cdn.ipadbiz.cn/xys/map/%E7%BA%BF%E8%B7%AF@2x.png" size="1.25rem" style="vertical-align: middle;" />
63 - 路线
64 </div> 60 </div>
65 <div v-else class="item" @click="handleSafeRoute(false)"> 61 <div v-else class="item" @click="handleSafeRoute(false)">
66 - <i class="fa fa-eye-slash"></i><br /> 62 + <van-icon name="https://cdn.ipadbiz.cn/xys/map/%E7%BA%BF%E8%B7%AF@2x.png" size="1.25rem" style="vertical-align: middle;" />
67 - 路线
68 </div> 63 </div>
69 </div> 64 </div>
70 </div> 65 </div>
...@@ -213,7 +208,7 @@ export default { ...@@ -213,7 +208,7 @@ export default {
213 show_nav_popup: false, 208 show_nav_popup: false,
214 showInfoWindow: false, 209 showInfoWindow: false,
215 infoWindow: {}, 210 infoWindow: {},
216 - itemInfo: '', 211 + itemInfo: {},
217 navBarList: [], 212 navBarList: [],
218 rect: {}, 213 rect: {},
219 navList: [], 214 navList: [],
...@@ -268,7 +263,7 @@ export default { ...@@ -268,7 +263,7 @@ export default {
268 initMap() { 263 initMap() {
269 // 初始化地图 264 // 初始化地图
270 this.map = new AMap.Map('container', { 265 this.map = new AMap.Map('container', {
271 - viewMode: '3D', // 设置地图模式 266 + viewMode: '2D', // 设置地图模式
272 turboMode: false, 267 turboMode: false,
273 showIndoorMap: false, 268 showIndoorMap: false,
274 defaultCursor: 'pointer', // 地图默认鼠标样式 269 defaultCursor: 'pointer', // 地图默认鼠标样式
...@@ -1025,10 +1020,15 @@ export default { ...@@ -1025,10 +1020,15 @@ export default {
1025 text-align: center; 1020 text-align: center;
1026 box-shadow: 0 -1px 0 rgba(80, 80, 80, 0.1); 1021 box-shadow: 0 -1px 0 rgba(80, 80, 80, 0.1);
1027 z-index: 999; 1022 z-index: 999;
1028 - padding: 0.5rem 0; 1023 + // padding: 0.5rem 0;
1024 + padding-bottom: 0.5rem;
1025 + .nav-bar-content {
1026 + display: flex; overflow-x: scroll; overflow-y: hidden; -webkit-overflow-scrolling: touch; position: relative;
1027 + }
1029 .item { 1028 .item {
1030 padding-top: 0.5rem; 1029 padding-top: 0.5rem;
1031 color: #888; 1030 color: #888;
1031 + width: 21.5%; flex-shrink: 0; padding-top: 1rem;
1032 } 1032 }
1033 1033
1034 .checked { 1034 .checked {
...@@ -1044,9 +1044,9 @@ export default { ...@@ -1044,9 +1044,9 @@ export default {
1044 } 1044 }
1045 1045
1046 .operate-bar-wrapper { 1046 .operate-bar-wrapper {
1047 - position: absolute; 1047 + position: fixed;
1048 - right: 20px; 1048 + left: 20px;
1049 - top: 5%; 1049 + bottom: 6rem;
1050 width: 20px; 1050 width: 20px;
1051 height: auto; 1051 height: auto;
1052 z-index: 100; 1052 z-index: 100;
...@@ -1064,8 +1064,9 @@ export default { ...@@ -1064,8 +1064,9 @@ export default {
1064 height: 2rem; 1064 height: 2rem;
1065 background-color: white; 1065 background-color: white;
1066 margin-bottom: 1rem; 1066 margin-bottom: 1rem;
1067 - border-radius: 1px; 1067 + border-radius: 50%;
1068 padding: 2.5px; 1068 padding: 2.5px;
1069 + line-height: 2rem;
1069 } 1070 }
1070 } 1071 }
1071 } 1072 }
......