From cb033104ee5a64c91e5381fca0e48b3cbd90a15e Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Sat, 21 Jun 2025 19:35:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=20//=20@ts-expect-error=20?= =?UTF-8?q?=E9=A2=84=E7=9F=A5=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/fg-tabbar/fg-tabbar.vue | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/layouts/fg-tabbar/fg-tabbar.vue b/src/layouts/fg-tabbar/fg-tabbar.vue index 0079c25..d1a00b1 100644 --- a/src/layouts/fg-tabbar/fg-tabbar.vue +++ b/src/layouts/fg-tabbar/fg-tabbar.vue @@ -3,6 +3,7 @@ import { tabbarStore } from './tabbar' // 'i-carbon-code', import { tabbarList as _tabBarList, cacheTabbarEnable, selectedTabbarStrategy } from './tabbarList' +// @ts-expect-error 预知的判断 const customTabbarEnable = selectedTabbarStrategy === 1 || selectedTabbarStrategy === 2 /** tabbarList 里面的 path 从 pages.config.ts 得到 */ const tabbarList = _tabBarList.map(item => ({ ...item, path: `/${item.pagePath}` })) @@ -18,6 +19,7 @@ function selectTabBar({ value: index }: { value: number }) { } onLoad(() => { // 解决原生 tabBar 未隐藏导致有2个 tabBar 的问题 + // @ts-expect-error 预知的判断 const hideRedundantTabbarEnable = selectedTabbarStrategy === 1 hideRedundantTabbarEnable && uni.hideTabBar({ @@ -34,18 +36,15 @@ onLoad(() => {