mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-07-12 16:01:35 +08:00
fix ui
This commit is contained in:
@@ -10,25 +10,8 @@ const props = defineProps({
|
||||
// 路由参数
|
||||
const route = useRoute()
|
||||
|
||||
// 面包屑标题定义
|
||||
const titles: { [key: string]: any } = {
|
||||
tmdb: {
|
||||
trending: '流行趋势',
|
||||
movies: '热门电影',
|
||||
tvs: '热门电视剧',
|
||||
},
|
||||
douban: {
|
||||
movies: '最新电影',
|
||||
tvs: '最新电视剧',
|
||||
tv_weekly_chinese: '华语剧集榜',
|
||||
tv_weekly_global: '全球剧集榜',
|
||||
movie_top250: '电影TOP250',
|
||||
},
|
||||
credits: '演员阵容',
|
||||
media: {
|
||||
search: '搜索',
|
||||
},
|
||||
}
|
||||
// 标题
|
||||
const title = route.query?.title?.toString()
|
||||
|
||||
// 计算API路径
|
||||
function getApiPath(paths: string[] | string) {
|
||||
@@ -37,24 +20,17 @@ function getApiPath(paths: string[] | string) {
|
||||
else
|
||||
return paths
|
||||
}
|
||||
|
||||
// 面包屑标题
|
||||
function getTitle(paths: string[] | string, title: any = '') {
|
||||
if (Array.isArray(paths)) {
|
||||
if (title)
|
||||
return [titles[paths[0]][paths[1]], title]
|
||||
|
||||
return ['推荐', titles[paths[0]][paths[1]]]
|
||||
}
|
||||
else {
|
||||
return ['发现']
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<VBreadcrumbs :items="getTitle(props.paths || '', route.query?.title)" />
|
||||
<div v-if="title" class="mt-8 md:flex md:items-center md:justify-between">
|
||||
<div class="min-w-0 flex-1 mx-0">
|
||||
<h2 class="mb-4 truncate text-2xl font-bold leading-7 text-gray-100 sm:overflow-visible sm:text-4xl sm:leading-9 md:mb-0" data-testid="page-header">
|
||||
<span class="text-moviepilot">{{ title }}</span>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<MediaCardListView
|
||||
:apipath="getApiPath(props.paths || '')"
|
||||
:params="route.query"
|
||||
|
||||
@@ -11,7 +11,7 @@ import MediaCardSlideView from '@/views/discover/MediaCardSlideView.vue'
|
||||
class="slider-header ms-1"
|
||||
>
|
||||
<RouterLink
|
||||
to="/browse/tmdb/trending"
|
||||
to="/browse/tmdb/trending?title=流行趋势"
|
||||
class="slider-title"
|
||||
>
|
||||
<span>流行趋势</span>
|
||||
@@ -31,7 +31,7 @@ import MediaCardSlideView from '@/views/discover/MediaCardSlideView.vue'
|
||||
class="slider-header mt-3 ms-1"
|
||||
>
|
||||
<RouterLink
|
||||
to="/browse/tmdb/movies"
|
||||
to="/browse/tmdb/movies?title=热门电影"
|
||||
class="slider-title"
|
||||
>
|
||||
<span>热门电影</span>
|
||||
@@ -51,7 +51,7 @@ import MediaCardSlideView from '@/views/discover/MediaCardSlideView.vue'
|
||||
class="slider-header mt-3 ms-1"
|
||||
>
|
||||
<RouterLink
|
||||
to="/browse/tmdb/tvs"
|
||||
to="/browse/tmdb/tvs?title=热门电视剧"
|
||||
class="slider-title"
|
||||
>
|
||||
<span>热门电视剧</span>
|
||||
@@ -71,7 +71,7 @@ import MediaCardSlideView from '@/views/discover/MediaCardSlideView.vue'
|
||||
class="slider-header mt-3 ms-1"
|
||||
>
|
||||
<RouterLink
|
||||
to="/browse/douban/movies"
|
||||
to="/browse/douban/movies?title=最新电影"
|
||||
class="slider-title"
|
||||
>
|
||||
<span>最新电影</span>
|
||||
@@ -91,7 +91,7 @@ import MediaCardSlideView from '@/views/discover/MediaCardSlideView.vue'
|
||||
class="slider-header mt-3 ms-1"
|
||||
>
|
||||
<RouterLink
|
||||
to="/browse/douban/tvs"
|
||||
to="/browse/douban/tvs?title=最新电视剧"
|
||||
class="slider-title"
|
||||
>
|
||||
<span>最新电视剧</span>
|
||||
@@ -111,7 +111,7 @@ import MediaCardSlideView from '@/views/discover/MediaCardSlideView.vue'
|
||||
class="slider-header mt-3 ms-1"
|
||||
>
|
||||
<RouterLink
|
||||
to="/browse/douban/movie_top250"
|
||||
to="/browse/douban/movie_top250?title=电影TOP250"
|
||||
class="slider-title"
|
||||
>
|
||||
<span>电影TOP250</span>
|
||||
@@ -131,7 +131,7 @@ import MediaCardSlideView from '@/views/discover/MediaCardSlideView.vue'
|
||||
class="slider-header mt-3 ms-1"
|
||||
>
|
||||
<RouterLink
|
||||
to="/browse/douban/tv_weekly_chinese"
|
||||
to="/browse/douban/tv_weekly_chinese?title=国产剧集榜"
|
||||
class="slider-title"
|
||||
>
|
||||
<span>国产剧集榜</span>
|
||||
@@ -151,7 +151,7 @@ import MediaCardSlideView from '@/views/discover/MediaCardSlideView.vue'
|
||||
class="slider-header mt-3 ms-1"
|
||||
>
|
||||
<RouterLink
|
||||
to="/browse/douban/tv_weekly_global"
|
||||
to="/browse/douban/tv_weekly_global?title=全球剧集榜"
|
||||
class="slider-title"
|
||||
>
|
||||
<span>全球剧集榜</span>
|
||||
|
||||
Reference in New Issue
Block a user