Преглед изворни кода

解决isPageTabbar在设置0: NO_TABBAR时返回true 问题

haos пре 6 месеци
родитељ
комит
e61ad54da5
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      src/tabbar/store.ts

+ 4 - 1
src/tabbar/store.ts

@@ -4,7 +4,7 @@ import { reactive } from 'vue'
 import { isNeedLoginMode } from '@/router/config'
 import { FG_LOG_ENABLE, judgeIsExcludePath } from '@/router/interceptor'
 import { useTokenStore } from '@/store/token'
-import { tabbarList as _tabbarList, customTabbarEnable } from './config'
+import { tabbarList as _tabbarList, customTabbarEnable, selectedTabbarStrategy, TABBAR_STRATEGY_MAP } from './config'
 
 // TODO 1/2: 中间的鼓包tabbarItem的开关
 const BULGE_ENABLE = false
@@ -25,6 +25,9 @@ if (customTabbarEnable && BULGE_ENABLE) {
 }
 
 export function isPageTabbar(path: string) {
+  if (selectedTabbarStrategy === TABBAR_STRATEGY_MAP.NO_TABBAR) {
+    return false
+  }
   const _path = path.split('?')[0]
   return tabbarList.some(item => item.pagePath === _path)
 }