liveh5-nuxt/app/components/AppFooter.vue

31 lines
738 B
Vue
Raw Normal View History

2025-01-08 05:26:12 +00:00
<script setup lang="ts">
import { useAppFooterRouteNames as names } from '~/config'
const route = useRoute()
const active = ref(0)
const show = computed(() => {
if (route.name && names.includes(route.name))
return true
return false
})
</script>
<template>
<van-tabbar v-if="show" v-model="active" route placeholder fixed>
<van-tabbar-item replace to="/">
<span>{{ $t('tabbar.home') }}</span>
<template #icon>
<div class="i-carbon:home" />
</template>
</van-tabbar-item>
<van-tabbar-item replace to="/profile">
<span>{{ $t('tabbar.profile') }}</span>
<template #icon>
2025-01-10 08:38:18 +00:00
<div class="i-carbon:user" />
2025-01-08 05:26:12 +00:00
</template>
</van-tabbar-item>
</van-tabbar>
</template>