feat: 首页tab的调整

This commit is contained in:
2026-04-28 16:20:50 +08:00
parent d3ef285c6d
commit 47d2b5bb3f
7 changed files with 100 additions and 97 deletions

View File

@@ -15,18 +15,17 @@
mode="widthFix"
/>
<view
class="absolute bottom-0 left-0 right-0 flex-full px-12 pt-12 pb-4"
class="absolute bottom-0 left-0 right-0 flex-full"
>
<HomeWelcome />
<view class="px-12 pt-12">
<HomeWelcome />
</view>
<view style="margin-bottom: -1px;">
<AiTabSwitch v-model="tabIndex" :list="tabList" @change="handleChange" />
</view>
</view>
</view>
<AiTabSwitch
v-model="tabIndex"
:list="['探索发现', 'AI伴游']"
@change="handleChange"
/>
<view class="tab-content">
<Discovery v-if="tabIndex === 0" />
<ChatMainList v-if="tabIndex === 1" />
@@ -46,6 +45,7 @@ import ChatMainList from "../ChatMain/ChatMainList/index.vue";
import Discovery from "../Discovery/index.vue";
const tabIndex = ref(0);
const tabList = ["探索发现", "AI伴游"];
const handleChange = (i) => {
console.log("切换:", i);