bugfix:ui
This commit is contained in:
@@ -14,6 +14,7 @@ export const STORAGE_KEYS = {
|
||||
USER_INFO: 'zt_closet_user_info',
|
||||
UNREAD: 'zt_closet_unread',
|
||||
OPEN_COLLECT: 'zt_open_collect',
|
||||
OPEN_PROFILE_EDIT: 'zt_open_profile_edit',
|
||||
}
|
||||
|
||||
// 衣物图片处理状态
|
||||
|
||||
@@ -17,6 +17,12 @@ export function syncTabBarUnread(force = true): void {
|
||||
if (tabBar && typeof tabBar.syncUnread === 'function') tabBar.syncUnread(force)
|
||||
}
|
||||
|
||||
// 用已知数量直接更新红点:不发请求,供页面拉到最新未读数后同步 tabBar
|
||||
export function setTabBarUnread(count: number): void {
|
||||
const tabBar = getTabBarInstance()
|
||||
if (tabBar && typeof tabBar.setUnread === 'function') tabBar.setUnread(count)
|
||||
}
|
||||
|
||||
// 更新选中态:走 tabBar 的 setSelected(内部保证首帧安全),
|
||||
// 老版本实例没有该方法时降级为 setData
|
||||
export function setTabBarSelected(index: number): void {
|
||||
|
||||
Reference in New Issue
Block a user