Explorar el Código

feat: app 里面才需要 hideTabBar

菲鸽 hace 2 años
padre
commit
0d948a0691
Se han modificado 1 ficheros con 10 adiciones y 1 borrados
  1. 10 1
      src/components/fg-tabbar/fg-tabbar.vue

+ 10 - 1
src/components/fg-tabbar/fg-tabbar.vue

@@ -36,6 +36,15 @@ function selectTabBar({ value: index }: { value: number }) {
 }
 onLoad(() => {
   // 解决原生 tabBar 未隐藏导致有2个 tabBar 的问题
-  uni.hideTabBar()
+  // #ifdef APP-PLUS
+  uni.hideTabBar({
+    fail(err) {
+      console.log('hideTabBar fail: ', err)
+    },
+    success(res) {
+      console.log('hideTabBar success: ', res)
+    },
+  })
+  // #endif
 })
 </script>