fix(路由): 调整Tabbar显示逻辑以排除特定路径

修改了路由配置和Tabbar组件,确保在`/cabinet`和`/approval/list`路径下不显示Tabbar。这有助于避免在这些页面中显示不必要的底部导航栏。
This commit is contained in:
dzq 2025-05-05 16:35:49 +08:00
parent a4c709143f
commit d59e994b3e
2 changed files with 5 additions and 2 deletions

View File

@ -3,7 +3,10 @@ const router = useRouter()
const tabbarItemList = computed(() => { const tabbarItemList = computed(() => {
const routes = router.getRoutes() const routes = router.getRoutes()
return routes.filter(route => route.meta.layout?.tabbar?.showTabbar && route.path !== '/cabinet') return routes.filter(route => route.meta.layout?.tabbar?.showTabbar
&& route.path !== '/cabinet'
&& route.path!== '/approval/list'
)
.map(route => ({ .map(route => ({
title: route.meta.title, title: route.meta.title,
icon: route.meta.layout?.tabbar?.icon, icon: route.meta.layout?.tabbar?.icon,

View File

@ -105,7 +105,7 @@ export const routes: RouteRecordRaw[] = [
showLeftArrow: false showLeftArrow: false
}, },
tabbar: { tabbar: {
showTabbar: false, showTabbar: true,
icon: "home-o" icon: "home-o"
} }
} }