refactor(fg-tabbar): 移除冗余的ts-expect-error注释

这些注释用于标记预知的类型判断,但实际代码逻辑已经足够清晰,移除后不影响代码可读性
This commit is contained in:
feige996
2025-06-28 18:13:21 +08:00
parent 3781aa842a
commit 9597282ccb

View File

@@ -3,7 +3,6 @@ import { tabbarStore } from './tabbar'
// 'i-carbon-code',
import { tabbarList as _tabBarList, cacheTabbarEnable, selectedTabbarStrategy, TABBAR_MAP } from './tabbarList'
// @ts-expect-error 预知的判断
const customTabbarEnable
= selectedTabbarStrategy === TABBAR_MAP.CUSTOM_TABBAR_WITH_CACHE
|| selectedTabbarStrategy === TABBAR_MAP.CUSTOM_TABBAR_WITHOUT_CACHE
@@ -22,7 +21,6 @@ function selectTabBar({ value: index }: { value: number }) {
}
onLoad(() => {
// 解决原生 tabBar 未隐藏导致有2个 tabBar 的问题
// @ts-expect-error 预知的判断
const hideRedundantTabbarEnable = selectedTabbarStrategy === TABBAR_MAP.CUSTOM_TABBAR_WITH_CACHE
hideRedundantTabbarEnable
&& uni.hideTabBar({