diff --git a/src/App.vue b/src/App.vue index a954b8a..a2e6172 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,36 +4,30 @@ import { useRoute, useRouter } from 'vue-router' import { useI18n } from 'vue-i18n' import { useDisplay } from 'vuetify' import { useUserStore } from './stores/user' -import { useLocaleStore } from './stores/locale' import Toast from './components/Toast.vue' const route = useRoute() const { t } = useI18n() -const localeStore = useLocaleStore() const router = useRouter() const userStore = useUserStore() const display = useDisplay() const currentRoute = computed(() => route.path) -const currentLocaleLabel = computed(() => { - return ( - localeStore.localeOptions.find((o) => o.value === localeStore.currentLocale)?.label ?? - String(localeStore.currentLocale) - ) -}) -const showBottomNav = computed(() => display.smAndDown.value) -const mineTargetPath = computed(() => (userStore.isLoggedIn ? '/wallet' : '/login')) +const showBottomNav = computed(() => { + if (!display.smAndDown.value) return false + return currentRoute.value === '/' || currentRoute.value === '/search' || currentRoute.value === '/profile' +}) +const mineTargetPath = computed(() => '/profile') const bottomNavValue = computed({ get() { const p = currentRoute.value - if (p.startsWith('/wallet')) return '/wallet' - if (p.startsWith('/login')) return '/wallet' // Mine 入口在登录页也保持高亮 + if (p.startsWith('/profile')) return '/profile' if (p.startsWith('/search')) return '/search' return '/' }, set(v: string) { - if (v === '/wallet') router.push(mineTargetPath.value) + if (v === '/profile') router.push(mineTargetPath.value) else router.push(v) }, }) @@ -74,29 +68,6 @@ watch( TestMarket - - - - - - ${{ userStore.balance }} - - - - - - - + + + + mdi-account + + @@ -160,7 +126,7 @@ watch( mdi-magnify Search - + mdi-account-outline Mine @@ -206,20 +172,6 @@ watch( color: rgba(0, 0, 0, 0.87); } -.locale-btn { - text-transform: none; -} - -.locale-label { - margin-left: 6px; - font-size: 12px; - color: rgba(0, 0, 0, 0.72); - max-width: 88px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - /* 底部导航:整条栏上方淡投影 */ :deep(.v-bottom-navigation) { box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06); @@ -260,6 +212,7 @@ watch( :global(html), :global(body) { background: rgb(252, 252, 252); + scrollbar-gutter: stable; } :global(.v-application) { background: rgb(252, 252, 252);