1
This commit is contained in:
@@ -96,6 +96,12 @@ const MainPage: React.FC = () => {
|
||||
if (code === currentTab) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 切换标签时关闭城市选择器
|
||||
if (isCityPickerVisible) {
|
||||
setIsCityPickerVisible(false);
|
||||
}
|
||||
|
||||
setCurrentTab(code as TabType);
|
||||
// 切换标签时滚动到顶部
|
||||
(Taro as any).pageScrollTo({
|
||||
@@ -103,7 +109,7 @@ const MainPage: React.FC = () => {
|
||||
duration: 300,
|
||||
});
|
||||
},
|
||||
[currentTab]
|
||||
[currentTab, isCityPickerVisible]
|
||||
);
|
||||
|
||||
// 处理发布菜单显示/隐藏
|
||||
|
||||
Reference in New Issue
Block a user