fix: ui
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import Plyr from 'plyr'
|
||||
import 'plyr/dist/plyr.css'
|
||||
import { onMounted, onUnmounted, ref } from 'vue'
|
||||
import { BsChevronLeft } from 'vue-icons-plus/bs'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { postApi } from '../api/postApi'
|
||||
|
||||
@@ -111,10 +112,7 @@ onUnmounted(() => {
|
||||
<div class="min-h-screen bg-gray-50 flex flex-col">
|
||||
<div class="bg-white h-12 flex items-center px-4 border-b border-gray-100">
|
||||
<button @click="handleBack" class="text-gray-700">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
|
||||
stroke="currentColor" class="w-6 h-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5" />
|
||||
</svg>
|
||||
<BsChevronLeft class="w-6 h-6" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -49,9 +49,6 @@ useIntersectionObserver(
|
||||
}
|
||||
)
|
||||
|
||||
const showArticle = (id) => {
|
||||
router.push(`/posts/${id}`)
|
||||
}
|
||||
|
||||
const handleSearch = () => {
|
||||
articles.value = []
|
||||
@@ -86,8 +83,8 @@ onMounted(() => {
|
||||
暂无文章
|
||||
</div>
|
||||
|
||||
<ArticleListItem v-for="article in articles" :key="article.id" :article="article"
|
||||
@click="showArticle(article.id)" class="mb-4" />
|
||||
<ArticleListItem v-for="article in articles" :key="article.id" :article="{ ...article, bought: true }"
|
||||
class="mb-4" />
|
||||
|
||||
<div ref="loadingTrigger" class="py-4 text-center" v-show="hasMore || loading">
|
||||
<div v-if="loading"
|
||||
|
||||
@@ -47,10 +47,6 @@ useIntersectionObserver(
|
||||
}
|
||||
)
|
||||
|
||||
const showArticle = (id) => {
|
||||
router.push(`/posts/${id}`)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchArticles()
|
||||
})
|
||||
@@ -70,8 +66,9 @@ onMounted(() => {
|
||||
暂无已购买
|
||||
</div>
|
||||
|
||||
<ArticleListItem v-for="article in purchasedArticles" :key="article.id" :article="article"
|
||||
@click="showArticle(article.id)" class="mb-4" />
|
||||
<div v-for="article in purchasedArticles" :key="article.id" class="mb-4">
|
||||
<ArticleListItem :article="{ ...article, bought: true }" />
|
||||
</div>
|
||||
|
||||
<div ref="loadingTrigger" class="py-4 text-center" v-show="hasMore || loading">
|
||||
<div v-if="loading"
|
||||
|
||||
Reference in New Issue
Block a user