标签功能初版实现
This commit is contained in:
@@ -20,15 +20,8 @@ import BottomNav from './components/BottomNav.vue'
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
// 计算是否需要隐藏导航栏
|
||||
const isHiddenNav = computed(() => {
|
||||
// 需要隐藏导航栏的页面路径
|
||||
const hiddenNavRoutes = ['/settings']
|
||||
|
||||
// 检查是否是商品详情页(/product/数字)
|
||||
const isProductDetail = /^\/product\/\d+$/.test(route.path)
|
||||
|
||||
return hiddenNavRoutes.some(path => route.path.startsWith(path)) || isProductDetail
|
||||
return route.meta.hideNav as boolean
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user