diff --git a/src/components/fly-navbar/fly-navbar.vue b/src/components/fly-navbar/fly-navbar.vue index 5636cb4..d35761d 100644 --- a/src/components/fly-navbar/fly-navbar.vue +++ b/src/components/fly-navbar/fly-navbar.vue @@ -3,9 +3,7 @@ - - - + @@ -15,9 +13,7 @@ url="/pages/index/index" class="left-icon" > - - - + {{ title || '' }} @@ -31,7 +27,6 @@ defineProps<{ title?: string }>() // 获取页面栈 const pages = getCurrentPages() const isTabbar = getIsTabbar() -console.log({ isTabbar, pagesLen: pages.length }) // 获取屏幕边界到安全区域距离 const { safeAreaInsets } = uni.getSystemInfoSync() diff --git a/src/pages/index/demo/navbar.vue b/src/pages/index/demo/navbar.vue index 2c6fc38..b6c0a77 100644 --- a/src/pages/index/demo/navbar.vue +++ b/src/pages/index/demo/navbar.vue @@ -1,10 +1,6 @@ @@ -12,8 +8,3 @@ style: { navigationStyle: 'custom' }, } - - diff --git a/src/pages/throughout/index.vue b/src/pages/throughout/index.vue index e70d4c9..bad4f22 100644 --- a/src/pages/throughout/index.vue +++ b/src/pages/throughout/index.vue @@ -21,9 +21,7 @@ - - - + @@ -33,9 +31,7 @@ url="/pages/index/index" class="left-icon" > - - - + {{ '我是标题' }} diff --git a/src/utils/index.ts b/src/utils/index.ts index 3dd0f84..156116f 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -4,11 +4,10 @@ console.log(pagesJson) /** 判断当前页面是否是tabbar页 */ export const getIsTabbar = () => { - if (!pagesJson.tabBar || !pagesJson.tabBar.list.length) { + if (!pagesJson.tabBar) { return false } const pages = getCurrentPages() const currPath = pages.at(-1).route - console.log(currPath) return !!pagesJson.tabBar.list.find((e) => e.pagePath === currPath) }