style: adjust ai tab switch gap and clean up code

- reduce gap in AiTabSwitch styles from 40px to 20px
- format component tags in Discovery page for better readability
- update tab label check in isPanoramaGuideTab from "全景攻略" to "测试-2.0"
This commit is contained in:
duanshuwen
2026-07-07 11:23:30 +08:00
parent 409559e885
commit a44f0ee052
2 changed files with 5 additions and 12 deletions

View File

@@ -7,7 +7,7 @@
width: 100%; width: 100%;
height: 50px; height: 50px;
display: flex; display: flex;
gap: 40px; gap: 20px;
overflow: hidden; overflow: hidden;
} }

View File

@@ -6,16 +6,9 @@
<scroll-view class="discovery-scroll" scroll-y @scroll="handleContentScroll"> <scroll-view class="discovery-scroll" scroll-y @scroll="handleContentScroll">
<view class="discovery-body"> <view class="discovery-body">
<ExploreCards <ExploreCards v-if="discoveryCards.length > 0 && isPanoramaGuideTab" :list="discoveryCards"
v-if="discoveryCards.length > 0 && isPanoramaGuideTab" @didSelectItem="handleCardClick" />
:list="discoveryCards" <CardSwiper v-else-if="discoveryCards.length > 0" :list="discoveryCards" @didSelectItem="handleCardClick" />
@didSelectItem="handleCardClick"
/>
<CardSwiper
v-else-if="discoveryCards.length > 0"
:list="discoveryCards"
@didSelectItem="handleCardClick"
/>
<QuickQuestions v-if="discoveryQuickQuestions.length > 0" :list="discoveryQuickQuestions" <QuickQuestions v-if="discoveryQuickQuestions.length > 0" :list="discoveryQuickQuestions"
@didSelectItem="handleQuickQuestionClick" /> @didSelectItem="handleQuickQuestionClick" />
@@ -58,7 +51,7 @@ const discoveryQuickQuestions = ref([]);
const emit = defineEmits(["content-scroll"]); const emit = defineEmits(["content-scroll"]);
const isPanoramaGuideTab = computed(() => { const isPanoramaGuideTab = computed(() => {
return discoveryTabs.value[activeIndex.value]?.label === "全景攻略"; return discoveryTabs.value[activeIndex.value]?.label === "测试-2.0";
}); });
const handleContentScroll = (e) => { const handleContentScroll = (e) => {