mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-01 13:51:06 +08:00
fix types
This commit is contained in:
@@ -1,39 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import api from "@/api";
|
||||
|
||||
// 定义订阅字典结构
|
||||
interface MediaInfo {
|
||||
// 类型 电影、电视剧
|
||||
type?: string
|
||||
// 媒体标题
|
||||
title?: string
|
||||
// 年份
|
||||
year?: string
|
||||
// TMDB ID
|
||||
tmdb_id?: number
|
||||
// IMDB ID
|
||||
imdb_id?: string
|
||||
// TVDB ID
|
||||
tvdb_id?: string
|
||||
// 豆瓣ID
|
||||
douban_id?: string
|
||||
// 媒体原语种
|
||||
original_language?: string
|
||||
// 媒体原发行标题
|
||||
original_title?: string
|
||||
// 媒体发行日期
|
||||
release_date?: string
|
||||
// 背景图片
|
||||
backdrop_path?: string
|
||||
// 海报图片
|
||||
poster_path?: string
|
||||
// 评分
|
||||
vote_average: number
|
||||
// 描述
|
||||
overview?: string
|
||||
// 二级分类
|
||||
category?: string
|
||||
}
|
||||
import { MediaInfo } from "@/api/types";
|
||||
import MediaCard from "@/components/cards/MediaCard.vue";
|
||||
|
||||
// 输入参数
|
||||
const props = defineProps({
|
||||
@@ -63,12 +31,8 @@ onMounted(fetchData);
|
||||
<template>
|
||||
<VRow>
|
||||
<VCol v-for="data in dataList" :key="data.tmdb_id" cols="6" md="3" lg="2">
|
||||
<VCard>
|
||||
<VImg
|
||||
:src="data.poster_path"
|
||||
cover
|
||||
/>
|
||||
</VCard>
|
||||
<MediaCard :media="data">
|
||||
</MediaCard>
|
||||
</VCol>
|
||||
</VRow>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user