调整首页搜索浮层与导览入口

This commit is contained in:
lyf
2026-07-05 22:14:22 +08:00
parent eca85b9fed
commit ad692e233a
10 changed files with 1094 additions and 1214 deletions

View File

@@ -1,175 +0,0 @@
<template>
<view class="guide-bottom-nav">
<view class="guide-bottom-nav-inner">
<view
v-for="tab in bottomNavTabs"
:key="tab.id"
class="guide-bottom-tab"
:class="[`tab-${tab.id}`, { active: activeTab === tab.id }]"
@tap="handleTabTap(tab.id)"
>
<view class="guide-bottom-icon" aria-hidden="true">
<template v-if="tab.id === 'guide'">
<view class="guide-icon-pin"></view>
<view class="guide-icon-path"></view>
</template>
<template v-else>
<view class="explain-icon-wave top"></view>
<view class="explain-icon-wave middle"></view>
<view class="explain-icon-wave bottom"></view>
</template>
</view>
<text class="guide-bottom-label">{{ tab.label }}</text>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import {
GUIDE_TOP_TABS,
type GuideTopTab
} from '@/utils/guideTopTabs'
const bottomNavTabs = GUIDE_TOP_TABS.filter((tab) => tab.id !== 'explain')
withDefaults(defineProps<{
activeTab?: GuideTopTab
}>(), {
activeTab: 'guide'
})
const emit = defineEmits<{
tabChange: [tab: GuideTopTab]
}>()
const handleTabTap = (tab: GuideTopTab) => {
emit('tabChange', tab)
}
</script>
<style scoped lang="scss">
.guide-bottom-nav {
position: absolute;
left: 0;
right: 0;
bottom: 0;
padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
box-sizing: border-box;
background: rgba(255, 255, 255, 0.96);
border-top: 1px solid #e6e8df;
box-shadow: 0 -10px 24px rgba(36, 49, 42, 0.1);
z-index: 2200;
transform: translateZ(0);
}
.guide-bottom-nav-inner {
height: 56px;
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 10px;
padding: 4px;
box-sizing: border-box;
background: #f4f5ef;
border: 1px solid #dfe2d9;
border-radius: 8px;
}
.guide-bottom-tab {
min-width: 0;
height: 46px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
box-sizing: border-box;
border-radius: 6px;
color: #515151;
transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.guide-bottom-tab.active {
background: #000000;
color: var(--museum-accent);
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
}
.guide-bottom-tab:active {
transform: translateY(1px);
}
.guide-bottom-icon {
position: relative;
width: 22px;
height: 22px;
flex: 0 0 22px;
color: currentColor;
}
.guide-icon-pin {
position: absolute;
left: 4px;
top: 1px;
width: 12px;
height: 15px;
box-sizing: border-box;
border: 2px solid currentColor;
border-radius: 8px 8px 8px 0;
transform: rotate(-45deg);
}
.guide-icon-pin::after {
content: '';
position: absolute;
left: 3px;
top: 3px;
width: 3px;
height: 3px;
background: currentColor;
border-radius: 50%;
}
.guide-icon-path {
position: absolute;
left: 1px;
right: 1px;
bottom: 2px;
height: 6px;
border-bottom: 2px solid currentColor;
border-left: 2px solid currentColor;
border-radius: 0 0 0 8px;
}
.explain-icon-wave {
position: absolute;
left: 2px;
right: 2px;
height: 4px;
border: 2px solid currentColor;
border-left: 0;
border-right: 0;
border-bottom: 0;
border-radius: 999px 999px 0 0;
}
.explain-icon-wave.top {
top: 3px;
}
.explain-icon-wave.middle {
top: 9px;
left: 5px;
}
.explain-icon-wave.bottom {
top: 15px;
right: 6px;
}
.guide-bottom-label {
font-size: 15px;
line-height: 20px;
font-weight: 700;
color: currentColor;
}
</style>

View File

@@ -1,7 +1,7 @@
<template>
<view
class="guide-page-frame"
:class="[`variant-${variant}`, { 'no-top-tabs': !showTopTabs, 'has-bottom-nav': showBottomNav }]"
:class="[`variant-${variant}`, { 'no-top-tabs': !showTopTabs }]"
>
<GuideTopTabs
v-if="showTopTabs"
@@ -32,16 +32,10 @@
<view class="guide-page-frame-body">
<slot></slot>
</view>
<GuideBottomNav
v-if="showBottomNav"
:active-tab="activeTab"
@tab-change="handleTabChange"
/>
</view>
</template>
<script setup lang="ts">
import GuideBottomNav from '@/components/navigation/GuideBottomNav.vue'
import GuideTopTabs from '@/components/navigation/GuideTopTabs.vue'
import type { GuideTopTab } from '@/utils/guideTopTabs'
@@ -51,7 +45,6 @@ withDefaults(defineProps<{
topTabsVariant?: 'underline' | 'segmented'
topTabsTop?: string
showTopTabs?: boolean
showBottomNav?: boolean
showBack?: boolean
showCancel?: boolean
backLabel?: string
@@ -62,7 +55,6 @@ withDefaults(defineProps<{
topTabsVariant: 'underline',
topTabsTop: '0',
showTopTabs: true,
showBottomNav: false,
showBack: false,
showCancel: false,
backLabel: '返回',

View File

@@ -395,7 +395,7 @@ const handlePrimaryAction = () => {
position: absolute;
left: 12px;
right: 12px;
bottom: calc(env(safe-area-inset-bottom) + 112px);
bottom: calc(env(safe-area-inset-bottom) + 24px);
padding: 10px 14px 14px;
display: flex;
flex-direction: column;

File diff suppressed because it is too large Load Diff