feat: 切换tab时,清空之前的发现页数据
This commit is contained in:
@@ -99,6 +99,11 @@ const handleMainPanoramaClick = () => {
|
||||
isMainPanoramaGuide.value = true;
|
||||
currentTabsId.value = "";
|
||||
discoveryTabs.value = [];
|
||||
clearDiscoveryData();
|
||||
};
|
||||
|
||||
/// 切换tab时,清空之前的发现页数据
|
||||
const clearDiscoveryData = () => {
|
||||
discoveryCards.value = [];
|
||||
exploreCards.value = [];
|
||||
discoveryQuickQuestions.value = [];
|
||||
@@ -113,6 +118,8 @@ const handleMainPanoramaClick = () => {
|
||||
const handleTabChange = ({ tab, idx }) => {
|
||||
activeIndex.value = idx;
|
||||
queryDiscoveryData(tab);
|
||||
/// 切换tab时,清空之前的发现页数据
|
||||
clearDiscoveryData();
|
||||
}
|
||||
|
||||
/// 请求发现页tab数据
|
||||
|
||||
Reference in New Issue
Block a user