修复点位搜索H5宽度适配
This commit is contained in:
@@ -137,11 +137,26 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
v-if="showGuideHomeDock"
|
||||
v-show="homeSearchExpanded"
|
||||
class="guide-home-search-scrim"
|
||||
@mousedown.stop.prevent="handleHomeSearchOutsideTap"
|
||||
@click.stop="handleHomeSearchOutsideTap"
|
||||
@touchstart.stop.prevent="handleHomeSearchOutsideTap"
|
||||
@tap.stop="handleHomeSearchOutsideTap"
|
||||
></view>
|
||||
|
||||
<view
|
||||
v-if="showGuideHomeDock"
|
||||
class="guide-home-dock"
|
||||
:class="{ expanded: homeSearchExpanded }"
|
||||
@mousedown.capture="handleHomeDockActivate"
|
||||
@click.capture="handleHomeDockActivate"
|
||||
@tap.capture="handleHomeDockActivate"
|
||||
>
|
||||
<PoiSearchPanel
|
||||
ref="homeSearchPanelRef"
|
||||
variant="home"
|
||||
@expanded-change="handleHomeSearchExpandedChange"
|
||||
/>
|
||||
@@ -404,6 +419,10 @@ const isPoiCardCollapsed = ref(false)
|
||||
const guideMapShellRef = ref<{
|
||||
clearRoute?: () => void
|
||||
} | null>(null)
|
||||
const homeSearchPanelRef = ref<{
|
||||
expandHomePanel?: () => void
|
||||
collapseHomePanel?: () => void
|
||||
} | null>(null)
|
||||
const homeSearchExpanded = ref(false)
|
||||
|
||||
let launchOverlayFallbackTimer: ReturnType<typeof setTimeout> | null = null
|
||||
@@ -1303,6 +1322,18 @@ const handleHomeSearchExpandedChange = (expanded: boolean) => {
|
||||
homeSearchExpanded.value = expanded
|
||||
}
|
||||
|
||||
const handleHomeSearchOutsideTap = () => {
|
||||
homeSearchPanelRef.value?.collapseHomePanel?.()
|
||||
homeSearchExpanded.value = false
|
||||
}
|
||||
|
||||
const handleHomeDockActivate = () => {
|
||||
if (homeSearchExpanded.value) return
|
||||
|
||||
homeSearchPanelRef.value?.expandHomePanel?.()
|
||||
homeSearchExpanded.value = true
|
||||
}
|
||||
|
||||
const handleOutdoorNavClose = () => {
|
||||
closeOutdoorNavPanel()
|
||||
}
|
||||
@@ -1897,8 +1928,10 @@ const handleExplainBack = () => {
|
||||
|
||||
.guide-home-dock {
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
right: 12px;
|
||||
--museum-h5-page-width: min(100vw, 430px);
|
||||
left: 50%;
|
||||
right: auto;
|
||||
width: calc(var(--museum-h5-page-width) - 24px);
|
||||
bottom: calc(env(safe-area-inset-bottom) + 16px);
|
||||
padding: 12px;
|
||||
box-sizing: border-box;
|
||||
@@ -1906,9 +1939,53 @@ const handleExplainBack = () => {
|
||||
border: 1px solid rgba(255, 255, 255, 0.96);
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 10px 28px rgba(36, 49, 42, 0.16);
|
||||
transform: translateX(-50%);
|
||||
z-index: 1003;
|
||||
}
|
||||
|
||||
.guide-home-dock.expanded {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
right: auto;
|
||||
top: 0;
|
||||
bottom: auto;
|
||||
width: var(--museum-h5-page-width);
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
height: var(--home-search-viewport-height, 100dvh);
|
||||
max-height: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: calc(env(safe-area-inset-top) + 12px) 14px calc(env(safe-area-inset-bottom) + 14px);
|
||||
background: #f7f8f2;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
transform: translateX(-50%);
|
||||
overflow: hidden;
|
||||
overscroll-behavior: contain;
|
||||
touch-action: pan-y;
|
||||
z-index: 1100;
|
||||
}
|
||||
|
||||
/* #ifdef H5 */
|
||||
.guide-home-dock.expanded {
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
max-width: var(--museum-h5-page-width);
|
||||
}
|
||||
/* #endif */
|
||||
|
||||
.guide-home-search-scrim {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background: transparent;
|
||||
z-index: 1002;
|
||||
}
|
||||
|
||||
.guide-quick-actions {
|
||||
position: absolute;
|
||||
top: clamp(96px, 14vh, 118px);
|
||||
|
||||
Reference in New Issue
Block a user