This commit is contained in:
2026-09-15 17:18:15 +08:00
parent 26c392d612
commit 469a361a2b
8 changed files with 78 additions and 34 deletions
+10
View File
@@ -31,3 +31,13 @@ export function setTabBarSelected(index: number): void {
if (typeof tabBar.setSelected === 'function') tabBar.setSelected(index)
else tabBar.setData({ selected: index })
}
// 弹层遮罩期间隐藏悬浮标签栏:tabBar 由框架渲染在页面容器之上,
// 页面内任何 z-index 都盖不住它,只能让组件自身淡出(内部同样走首帧安全更新)。
// 弹层关闭后必须恢复,页面 onShow 时可再校准一次,避免残留隐藏。
export function setTabBarHidden(hidden: boolean): void {
const tabBar = getTabBarInstance()
if (!tabBar) return
if (typeof tabBar.setHidden === 'function') tabBar.setHidden(hidden)
else tabBar.setData({ hidden })
}