hookehuyr

fix 样式优化

...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
41 "unplugin-vue-components": "^0.24.1", 41 "unplugin-vue-components": "^0.24.1",
42 "uuid": "^8.3.2", 42 "uuid": "^8.3.2",
43 "v-viewer": "^3.0.11", 43 "v-viewer": "^3.0.11",
44 - "vant": "^4.8.1", 44 + "vant": "^4.9.6",
45 "vconsole": "^3.14.6", 45 "vconsole": "^3.14.6",
46 "video.js": "^8.3.0", 46 "video.js": "^8.3.0",
47 "vite-plugin-dynamic-import": "^0.9.6", 47 "vite-plugin-dynamic-import": "^0.9.6",
......
1 <!-- 1 <!--
2 * @Date: 2024-09-15 22:08:49 2 * @Date: 2024-09-15 22:08:49
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-09-18 16:39:55 4 + * @LastEditTime: 2024-09-18 17:25:26
5 * @FilePath: /map-demo/src/views/bieyuan/info.vue 5 * @FilePath: /map-demo/src/views/bieyuan/info.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -61,14 +61,6 @@ ...@@ -61,14 +61,6 @@
61 </van-tabs> 61 </van-tabs>
62 </div> 62 </div>
63 </div> 63 </div>
64 - <div style="display: flex; justify-content: center; margin: 2rem 0;">
65 - <van-image
66 - width="3rem"
67 - height="3rem"
68 - fit="contain"
69 - src="https://cdn.ipadbiz.cn/bieyuan/map/icon/scan_logo.png"
70 - />
71 - </div>
72 </div> 64 </div>
73 </template> 65 </template>
74 66
......
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: 2024-09-18 16:43:00 4 + * @LastEditTime: 2024-09-18 17:24:37
5 * @FilePath: /map-demo/src/views/bieyuan/map.vue 5 * @FilePath: /map-demo/src/views/bieyuan/map.vue
6 * @Description: 公众地图主体页面 6 * @Description: 公众地图主体页面
7 --> 7 -->
8 <template> 8 <template>
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 @click="scanQrcode" style="position: absolute; bottom: 3rem; left: calc(50% - 2.5rem);"> 11 + <div style="position: absolute; top: 2rem; right: 1rem; display: flex; flex-direction: column;">
12 + <van-icon size="2rem" name="search" color="#DD7850" style="margin-bottom: 1rem;" />
13 + <van-image
14 + width="2rem"
15 + height="2rem"
16 + fit="contain"
17 + src="https://cdn.ipadbiz.cn/bieyuan/map/icon/NAV@3x.png"
18 + />
19 + </div>
20 + <div style="position: absolute; top: 2rem; left: calc(50% - 1.5rem);">
21 + <van-image
22 + width="3rem"
23 + height="3rem"
24 + fit="contain"
25 + src="https://cdn.ipadbiz.cn/bieyuan/map/icon/index_logo@3x.png"
26 + />
27 + </div>
28 + <div @click="scanQrcode" style="position: absolute; bottom: 1rem; left: calc(50% - 2.5rem);">
12 <van-image 29 <van-image
13 width="5rem" 30 width="5rem"
14 height="5rem" 31 height="5rem"
...@@ -18,10 +35,16 @@ ...@@ -18,10 +35,16 @@
18 </div> 35 </div>
19 36
20 <van-config-provider :theme-vars="themeVars"> 37 <van-config-provider :theme-vars="themeVars">
21 - <van-floating-panel v-model:height="info_height" :anchors="anchors" @height-change="onHeightChange"> 38 + <van-floating-panel v-model:height="info_height" :anchors="anchors" @height-change="onHeightChange" :content-draggable="true">
39 + <template #header>
40 + <div class="custom-header">
41 + <h3>自定义标题</h3>
42 + <button @click="show = false">关闭</button>
43 + </div>
44 + </template>
22 <page-info ref="pageInfo"></page-info> 45 <page-info ref="pageInfo"></page-info>
23 <div v-if="showClose" @click="closeFloatPanel" class="close-float-panel"> 46 <div v-if="showClose" @click="closeFloatPanel" class="close-float-panel">
24 - <van-icon name="cross" color="#FFF" size="1.5rem" /> 47 + <van-icon name="arrow-left" color="#FFF" size="1.5rem" />
25 </div> 48 </div>
26 </van-floating-panel> 49 </van-floating-panel>
27 </van-config-provider> 50 </van-config-provider>
...@@ -306,7 +329,7 @@ export default { ...@@ -306,7 +329,7 @@ export default {
306 // 打开浮动面板 329 // 打开浮动面板
307 this.info_height = (0.5 * window.innerHeight); 330 this.info_height = (0.5 * window.innerHeight);
308 // 浮动面板样式 331 // 浮动面板样式
309 - $('.van-floating-panel__content').css('borderRadius', '1rem'); 332 + $('.van-floating-panel__content').css('borderRadius', '0.5rem');
310 }) 333 })
311 } 334 }
312 }); 335 });
...@@ -575,17 +598,20 @@ export default { ...@@ -575,17 +598,20 @@ export default {
575 }, 598 },
576 onHeightChange ({ height }) { // 监听浮动面板高度变化 599 onHeightChange ({ height }) { // 监听浮动面板高度变化
577 if (height === window.innerHeight) { 600 if (height === window.innerHeight) {
578 - // 浮动面板样式 601 + // // 浮动面板样式
579 - $('.van-floating-panel__content').css('borderRadius', '0'); 602 + // $('.van-floating-panel__content').css('borderRadius', '0');
580 - this.showClose = true; 603 + // this.showClose = true;
604 + this.$router.push({
605 + path: '/bieyuan/info'
606 + })
581 } else { 607 } else {
582 - $('.van-floating-panel__content').css('borderRadius', '1rem'); 608 + $('.van-floating-panel__content').css('borderRadius', '0.5rem');
583 this.showClose = false; 609 this.showClose = false;
584 } 610 }
585 }, 611 },
586 closeFloatPanel () { 612 closeFloatPanel () {
587 this.info_height = (0.5 * window.innerHeight); 613 this.info_height = (0.5 * window.innerHeight);
588 - $('.van-floating-panel__content').css('borderRadius', '1rem'); 614 + $('.van-floating-panel__content').css('borderRadius', '0.5rem');
589 this.showClose = false; 615 this.showClose = false;
590 // 关闭音频 616 // 关闭音频
591 this.$refs.pageInfo.outerStopAudio(); 617 this.$refs.pageInfo.outerStopAudio();
...@@ -776,4 +802,12 @@ export default { ...@@ -776,4 +802,12 @@ export default {
776 top: 1rem; 802 top: 1rem;
777 left: 1rem; 803 left: 1rem;
778 } 804 }
805 +
806 +.custom-header {
807 + display: flex;
808 + justify-content: space-between;
809 + align-items: center;
810 + padding: 10px;
811 + background-color: #f7f8fa;
812 +}
779 </style> 813 </style>
......
...@@ -426,11 +426,16 @@ ...@@ -426,11 +426,16 @@
426 "@vue/compiler-ssr" "3.3.4" 426 "@vue/compiler-ssr" "3.3.4"
427 "@vue/shared" "3.3.4" 427 "@vue/shared" "3.3.4"
428 428
429 -"@vue/shared@3.3.4", "@vue/shared@^3.0.0": 429 +"@vue/shared@3.3.4":
430 version "3.3.4" 430 version "3.3.4"
431 resolved "https://mirrors.cloud.tencent.com/npm/@vue/shared/-/shared-3.3.4.tgz" 431 resolved "https://mirrors.cloud.tencent.com/npm/@vue/shared/-/shared-3.3.4.tgz"
432 integrity sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ== 432 integrity sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==
433 433
434 +"@vue/shared@^3.5.5":
435 + version "3.5.6"
436 + resolved "https://mirrors.cloud.tencent.com/npm/@vue/shared/-/shared-3.5.6.tgz#602b3c2dccfe612f9e2e52e861dd7db340961a4f"
437 + integrity sha512-eidH0HInnL39z6wAt6SFIwBrvGOpDWsDxlw3rCgo1B+CQ1781WzQUSU3YjxgdkcJo9Q8S6LmXTkvI+cLHGkQfA==
438 +
434 "@vueuse/core@^8.5.0": 439 "@vueuse/core@^8.5.0":
435 version "8.9.4" 440 version "8.9.4"
436 resolved "https://mirrors.cloud.tencent.com/npm/@vueuse/core/-/core-8.9.4.tgz" 441 resolved "https://mirrors.cloud.tencent.com/npm/@vueuse/core/-/core-8.9.4.tgz"
...@@ -3139,14 +3144,14 @@ v-viewer@^3.0.11: ...@@ -3139,14 +3144,14 @@ v-viewer@^3.0.11:
3139 lodash "^4.17.21" 3144 lodash "^4.17.21"
3140 viewerjs "^1.9.0" 3145 viewerjs "^1.9.0"
3141 3146
3142 -vant@^4.8.1: 3147 +vant@^4.9.6:
3143 - version "4.8.1" 3148 + version "4.9.6"
3144 - resolved "https://mirrors.cloud.tencent.com/npm/vant/-/vant-4.8.1.tgz#b4fce5fb5aa9dfa42143c4122d1e2f92407ec768" 3149 + resolved "https://mirrors.cloud.tencent.com/npm/vant/-/vant-4.9.6.tgz#b82467589bca1a587efc6109c33ffe919dcb9e15"
3145 - integrity sha512-SkFZM3Z3Bwi5do+iQNfRgDi7b+Ka29rUUNzck06W2KoFie3CLTqSifLa5TuZCEoXPSkqR+fRH/VE5G57mmL8sg== 3150 + integrity sha512-lT0Q6hlYkZQngFWaQSxUIy8AK5bL0IlLiEtyNhMgwDwFpb3JV9DV03GWpUIQM45APm5SCC81xnPIjlrqP/64QA==
3146 dependencies: 3151 dependencies:
3147 "@vant/popperjs" "^1.3.0" 3152 "@vant/popperjs" "^1.3.0"
3148 "@vant/use" "^1.6.0" 3153 "@vant/use" "^1.6.0"
3149 - "@vue/shared" "^3.0.0" 3154 + "@vue/shared" "^3.5.5"
3150 3155
3151 vconsole@^3.14.6: 3156 vconsole@^3.14.6:
3152 version "3.15.0" 3157 version "3.15.0"
......