refactor: rename RecommendContent to ForYou

* chore: import `Trending` component to `Home`
This commit is contained in:
Hakadao
2023-10-13 15:18:46 +08:00
parent a3788b3aae
commit 4f7e871cf1
3 changed files with 13 additions and 5 deletions

View File

@@ -1,24 +1,29 @@
<script setup lang="ts">
import RecommendContent from './components/RecommendContent.vue'
import ForYou from './components/ForYou.vue'
import Following from './components/Following.vue'
import Trending from './components/Trending.vue'
import emitter from '~/utils/mitt'
import { settings } from '~/logic'
const handleBackToTop = inject('handleBackToTop') as () => void
const recommendContentKey = ref<string>(`recommendContent${Number(new Date())}`)
const activatedPage = ref<'RecommendContent' | 'Following'>('RecommendContent')
const pages = { RecommendContent, Following }
const activatedPage = ref<'ForYou' | 'Following' | 'Trending'>('ForYou')
const pages = { ForYou, Following, Trending }
const tabs = reactive<{ label: string; value: 'RecommendContent' | 'Following' }[]>([
const tabs = reactive<{ label: string; value: 'ForYou' | 'Following' | 'Trending' }[]>([
{
label: 'For you',
value: 'RecommendContent',
value: 'ForYou',
},
{
label: 'Following',
value: 'Following',
},
{
label: 'Trending',
value: 'Trending',
},
])
watch(() => activatedPage.value, () => {

View File

@@ -0,0 +1,3 @@
<template>
Trending
</template>