- 更新 AppFooter 组件中的路由名称引用 - 重命名 config 文件夹下的 index.ts 为 index.js - 删除 NationalMap 组件 - 新增 login 页面组件 - 更新 home 页面组件,移除 masonry 样式 - 更新 nuxt 配置,启用 pages:extend钩子 - 移除 package.json 中的 vue-masonry-wall依赖
34 lines
895 B
Vue
34 lines
895 B
Vue
<script setup>
|
|
import { useAppFooterRouteNames as names } from '~/config/index.js'
|
|
import MyIcon from "~/components/icons/MyIcon.vue";
|
|
import HomeIcon from "~/components/icons/HomeIcon.vue";
|
|
const route = useRoute()
|
|
|
|
const active = ref(0)
|
|
|
|
const show = computed(() => {
|
|
if (route.name && names.includes(route.name))
|
|
return true
|
|
return false
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<van-tabbar v-if="show" v-model="active" route placeholder fixed>
|
|
<van-tabbar-item replace to="/">
|
|
<span>{{ $t('tabbar.home') }}</span>
|
|
<template #icon>
|
|
<HomeIcon :active="active===0"></HomeIcon>
|
|
</template>
|
|
</van-tabbar-item>
|
|
<van-tabbar-item replace to="/profile">
|
|
<span>{{ $t('tabbar.profile') }}</span>
|
|
<template #icon>
|
|
<MyIcon :active="active===1"></MyIcon>
|
|
</template>
|
|
</van-tabbar-item>
|
|
</van-tabbar>
|
|
</div>
|
|
</template>
|