fix(tabbar): 修复微信小程序平台下原生tabbar隐藏问题

添加条件编译指令,仅在非微信小程序平台执行原生tabbar隐藏逻辑
This commit is contained in:
feige996
2025-08-28 15:31:08 +08:00
parent ccebecaed8
commit ca2b7452c8

View File

@@ -38,6 +38,8 @@ function handleClick(index: number) {
uni.navigateTo({ url })
}
}
// #ifndef MP-WEIXIN
// 因为有了 custom:true 微信里面不需要多余的hide操作
onLoad(() => {
// 解决原生 tabBar 未隐藏导致有2个 tabBar 的问题
needHideNativeTabbar
@@ -50,6 +52,7 @@ onLoad(() => {
},
})
})
// #endif
const activeColor = 'var(--wot-color-theme, #1890ff)'
const inactiveColor = '#666'
function getColorByIndex(index: number) {