mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-06 08:06:43 +08:00
fix cards
This commit is contained in:
@@ -12,3 +12,7 @@
|
|||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
max-width: 11rem;
|
max-width: 11rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grid-subscribe-card {
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
|
||||||
|
}
|
||||||
|
|||||||
@@ -30,7 +30,9 @@ onMounted(fetchData);
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="grid gap-3 grid-media-card">
|
<div class="grid gap-3 grid-media-card">
|
||||||
<MediaCard v-for="data in dataList" :key="data.tmdb_id" :media="data">
|
<MediaCard v-for="data in dataList"
|
||||||
|
:key="data.tmdb_id"
|
||||||
|
:media="data">
|
||||||
</MediaCard>
|
</MediaCard>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import api from "@/api";
|
import api from "@/api";
|
||||||
import { formatSeason } from "@core/utils/formatters";
|
|
||||||
import type { Subscribe } from "@/api/types";
|
import type { Subscribe } from "@/api/types";
|
||||||
|
import { formatSeason } from "@core/utils/formatters";
|
||||||
|
|
||||||
// 输入参数
|
// 输入参数
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -49,63 +49,64 @@ const getPercentage = (total: number, lack: number) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VRow>
|
<div class="grid gap-3 grid-subscribe-card">
|
||||||
<VCol v-for="data in filteredDataList" :key="data.id" cols="12" md="6" lg="4">
|
<VCard v-for="data in filteredDataList"
|
||||||
<VCard :image="data.backdrop || data.poster" class="card-with-overlay">
|
:key="data.id"
|
||||||
<VCardItem>
|
:image="data.backdrop || data.poster"
|
||||||
<template #prepend>
|
class="card-with-overlay">
|
||||||
<VIcon
|
<VCardItem>
|
||||||
size="1.9rem"
|
<template #prepend>
|
||||||
color="white"
|
<VIcon
|
||||||
:icon="getIcon(data.type)"
|
size="1.9rem"
|
||||||
class="overlay-text"
|
color="white"
|
||||||
/>
|
:icon="getIcon(data.type)"
|
||||||
</template>
|
class="overlay-text"
|
||||||
<VCardTitle class="text-white overlay-text">
|
/>
|
||||||
{{ data.name }} {{ formatSeason(data.season ? data.season.toString() : "") }}
|
</template>
|
||||||
</VCardTitle>
|
<VCardTitle class="text-white overlay-text">
|
||||||
<template #append>
|
{{ data.name }} {{ formatSeason(data.season ? data.season.toString() : "") }}
|
||||||
<div class="me-n3">
|
</VCardTitle>
|
||||||
<MoreBtn color="white" class="overlay-text"/>
|
<template #append>
|
||||||
</div>
|
<div class="me-n3">
|
||||||
</template>
|
<MoreBtn color="white" class="overlay-text"/>
|
||||||
</VCardItem>
|
|
||||||
|
|
||||||
<VCardText class="overlay-text">
|
|
||||||
<p class="clamp-text text-white mb-0">
|
|
||||||
{{ data.description }}
|
|
||||||
</p>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
<VCardText
|
|
||||||
class="d-flex justify-space-between align-center flex-wrap overlay-text"
|
|
||||||
>
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<IconBtn icon="mdi-star" color="white" class="me-1" />
|
|
||||||
<span class="text-subtitle-2 text-white me-4">{{ data.vote }}</span>
|
|
||||||
|
|
||||||
<IconBtn
|
|
||||||
icon="mdi-progress-clock"
|
|
||||||
color="white"
|
|
||||||
class="me-1"
|
|
||||||
v-if="data.total_episode"
|
|
||||||
/>
|
|
||||||
<span class="text-subtitle-2 text-white" v-if="data.season"
|
|
||||||
>{{ (data.total_episode || 0) - (data.lack_episode || 0) }} /
|
|
||||||
{{ data.total_episode }}</span
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</VCardText>
|
</template>
|
||||||
|
</VCardItem>
|
||||||
|
|
||||||
<VProgressLinear
|
<VCardText class="overlay-text">
|
||||||
v-if="data.total_episode || 0 > 0"
|
<p class="clamp-text text-white mb-0">
|
||||||
:model-value="getPercentage(data.total_episode || 0, data.lack_episode || 0)"
|
{{ data.description }}
|
||||||
bg-color="success"
|
</p>
|
||||||
color="success"
|
</VCardText>
|
||||||
/>
|
|
||||||
</VCard>
|
<VCardText
|
||||||
</VCol>
|
class="d-flex justify-space-between align-center flex-wrap overlay-text"
|
||||||
</VRow>
|
>
|
||||||
|
<div class="d-flex align-center">
|
||||||
|
<IconBtn icon="mdi-star" color="white" class="me-1" />
|
||||||
|
<span class="text-subtitle-2 text-white me-4">{{ data.vote }}</span>
|
||||||
|
|
||||||
|
<IconBtn
|
||||||
|
icon="mdi-progress-clock"
|
||||||
|
color="white"
|
||||||
|
class="me-1"
|
||||||
|
v-if="data.total_episode"
|
||||||
|
/>
|
||||||
|
<span class="text-subtitle-2 text-white" v-if="data.season"
|
||||||
|
>{{ (data.total_episode || 0) - (data.lack_episode || 0) }} /
|
||||||
|
{{ data.total_episode }}</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</VCardText>
|
||||||
|
|
||||||
|
<VProgressLinear
|
||||||
|
v-if="data.total_episode || 0 > 0"
|
||||||
|
:model-value="getPercentage(data.total_episode || 0, data.lack_episode || 0)"
|
||||||
|
bg-color="success"
|
||||||
|
color="success"
|
||||||
|
/>
|
||||||
|
</VCard>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user