feat: 首页调整
This commit is contained in:
@@ -1,14 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<AiTabSwitch v-model="tabIndex" :list="['探索发现', 'AI伴游']" @change="handleChange" />
|
<view> 探索发现
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
|
||||||
import AiTabSwitch from "@/components/AiTabSwitch/index.vue";
|
|
||||||
|
|
||||||
const tabIndex = ref(0);
|
|
||||||
|
|
||||||
const handleChange = (i) => {
|
|
||||||
console.log("切换:", i);
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
@@ -27,25 +27,9 @@
|
|||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<view>
|
<view class="tab-content">
|
||||||
<view
|
<Discovery v-if="tabIndex === 0" />
|
||||||
class="absolute top-0 left-0 w-full h-full flex flex-col items-center justify-center"
|
<ChatMainList v-if="tabIndex === 1" />
|
||||||
>
|
|
||||||
<text class="font-size-24 font-bold color-white mb-4"
|
|
||||||
>欢迎来到AI助手</text
|
|
||||||
>
|
|
||||||
<text class="font-size-16 color-white mb-8"
|
|
||||||
>您的智能聊天伴侣,随时为您提供帮助</text
|
|
||||||
>
|
|
||||||
<view class="flex space-x-4">
|
|
||||||
<view class="px-6 py-2 bg-green-500 text-white rounded-lg"
|
|
||||||
>开始聊天</view
|
|
||||||
>
|
|
||||||
<view class="px-6 py-2 bg-gray-300 text-gray-700 rounded-lg"
|
|
||||||
>了解更多</view
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -57,8 +41,9 @@ import { onLoad } from "@dcloudio/uni-app";
|
|||||||
|
|
||||||
import HomeNavBar from "./components/HomeNavBar.vue";
|
import HomeNavBar from "./components/HomeNavBar.vue";
|
||||||
import HomeWelcome from "./components/HomeWelcome.vue";
|
import HomeWelcome from "./components/HomeWelcome.vue";
|
||||||
|
|
||||||
import AiTabSwitch from "@/components/AiTabSwitch/index.vue";
|
import AiTabSwitch from "@/components/AiTabSwitch/index.vue";
|
||||||
|
import ChatMainList from "../ChatMain/ChatMainList/index.vue";
|
||||||
|
import Discovery from "../Discovery/index.vue";
|
||||||
|
|
||||||
const tabIndex = ref(0);
|
const tabIndex = ref(0);
|
||||||
|
|
||||||
@@ -80,7 +65,5 @@ onLoad(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.bg-color {
|
|
||||||
background: red;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user