Explorar o código

fix: app 未隐藏原生tabbar

菲鸽 %!s(int64=2) %!d(string=hai) anos
pai
achega
d6c6022a18
Modificáronse 2 ficheiros con 4 adicións e 3 borrados
  1. 0 3
      src/App.vue
  2. 4 0
      src/pages/index/index.vue

+ 0 - 3
src/App.vue

@@ -3,9 +3,6 @@ import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
 
 onLaunch(() => {
   console.log('App Launch')
-  // #ifdef H5
-  uni.hideTabBar()
-  // #endif
 })
 onShow(() => {
   console.log('App Show')

+ 4 - 0
src/pages/index/index.vue

@@ -48,6 +48,10 @@ const description = ref(
 onLoad(() => {
   console.log(author)
 })
+onLoad(() => {
+  // tabbar模板,直接在首页隐藏即可,全局只需要这一次
+  uni.hideTabBar()
+})
 </script>
 
 <style>