Browse Source

refactor(fg-tabbar): 调整缓存配置变量的位置

将 cacheTabbarEnable 变量定义移至 tabbarList 配置之后,保持代码逻辑顺序一致
feige996 10 months ago
parent
commit
0c1631f22b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/layouts/fg-tabbar/tabbarList.ts

+ 3 - 3
src/layouts/fg-tabbar/tabbarList.ts

@@ -11,9 +11,6 @@
 // TODO:通过这里切换使用tabbar的策略
 export const selectedTabbarStrategy = 0
 
-// 0 和 1 时,需要tabbar缓存
-export const cacheTabbarEnable = selectedTabbarStrategy < 2
-
 // selectedTabbarStrategy==0 时,需要填 iconPath 和 selectedIconPath
 // selectedTabbarStrategy==1 or 2 时,需要填 icon 和 iconType
 // selectedTabbarStrategy==3 时,tabbarList 不生效
@@ -49,6 +46,9 @@ export const tabbarList = [
   // },
 ]
 
+// 0 和 1 时,需要tabbar缓存
+export const cacheTabbarEnable = selectedTabbarStrategy < 2
+
 const _tabbar = {
   color: '#999999',
   selectedColor: '#018d71',