mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-02 06:10:33 +08:00
更新国际化支持
This commit is contained in:
@@ -1,31 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import PersonCardListView from '@/views/discover/PersonCardListView.vue'
|
||||
|
||||
// 输入参数
|
||||
const props = defineProps({
|
||||
// API路径
|
||||
paths: Array as PropType<string[]> | PropType<string>,
|
||||
})
|
||||
|
||||
// 路由参数
|
||||
const route = useRoute()
|
||||
|
||||
// 标题
|
||||
const id = route.query?.id?.toString()
|
||||
const title = route.query?.title?.toString()
|
||||
|
||||
// 类型
|
||||
const source = route.query?.source?.toString()
|
||||
const type = route.query?.type?.toString()
|
||||
|
||||
// 计算API路径
|
||||
function getApiPath(paths: string[] | string) {
|
||||
if (Array.isArray(paths)) return paths.join('/')
|
||||
else return paths
|
||||
}
|
||||
const apipath = route.query?.apipath?.toString()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<VPageContentTitle :title="title" />
|
||||
<PersonCardListView :apipath="getApiPath(props.paths || '')" :params="route.query" :type="type" />
|
||||
<PersonCardListView
|
||||
:credits-id="id"
|
||||
:credits-name="title"
|
||||
:credits-source="source"
|
||||
:credits-type="type"
|
||||
:credits-apipath="apipath"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -3,5 +3,7 @@ import TransferHistoryView from '@/views/reorganize/TransferHistoryView.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TransferHistoryView />
|
||||
<div>
|
||||
<TransferHistoryView />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,15 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
import MediaDetailView from '@/views/discover/MediaDetailView.vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
// 国际化
|
||||
const { t } = useI18n()
|
||||
|
||||
// 路由参数
|
||||
const route = useRoute()
|
||||
|
||||
// TMDBID
|
||||
// TMDB ID
|
||||
const mediaid = route.query?.mediaid?.toString()
|
||||
|
||||
// 类型
|
||||
// 类型:电影、电视剧
|
||||
const type = route.query?.type?.toString()
|
||||
|
||||
// 媒体信息来源:TMDB、豆瓣
|
||||
const source = route.query?.source?.toString() || 'themoviedb'
|
||||
|
||||
// TMDB ID
|
||||
const page = route.query?.page?.toString() || '1'
|
||||
|
||||
// 标题
|
||||
const title = route.query?.title?.toString()
|
||||
|
||||
@@ -19,6 +29,6 @@ const year = route.query?.year?.toString()
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<MediaDetailView :mediaid="mediaid" :type="type" :title="title" :year="year" />
|
||||
<MediaDetailView :mediaid="mediaid" :type="type" :source="source" :page="page" :title="title" :year="year" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import SiteListView from '@/views/site/SiteCardListView.vue'
|
||||
import SiteCardListView from '@/views/site/SiteCardListView.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<SiteListView />
|
||||
<SiteCardListView />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -3,5 +3,7 @@ import WorkflowListView from '@/views/workflow/WorkflowListView.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<WorkflowListView />
|
||||
<div>
|
||||
<WorkflowListView />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user