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