This commit is contained in:
jxxghp
2023-07-12 08:24:22 +08:00
parent 0e7e61ff6c
commit 87956a2259

View File

@@ -12,7 +12,7 @@ const cardState = ref(true);
// 进度条
const getPercentage = () => {
return props.info?.progress || 0;
return props.info?.progress ?? 0;
};
// 速度
@@ -39,9 +39,9 @@ const toggleDownload = async () => {
};
// 删除下截
const deleteDownload = () => {
const deleteDownload = async () => {
try {
api.delete(`download/${props.info?.hash}`);
await api.delete(`download/${props.info?.hash}`);
cardState.value = false;
} catch (error) {
console.error(error);
@@ -53,14 +53,23 @@ const deleteDownload = () => {
<VCard :key="props.info?.hash" v-if="cardState">
<div class="d-flex justify-space-between flex-nowrap flex-row">
<div class="ma-auto pa-3 pe-0" v-if="props.info?.media.image">
<VImg aspect-ratio="2/3" width="100" class="rounded" :src="props.info?.media.image" />
<VImg
aspect-ratio="2/3"
width="100"
class="rounded"
:src="props.info?.media.image"
/>
</div>
<div class="w-full">
<VCardTitle>{{ props.info?.media.title || props.info?.name }}
{{ props.info?.season_episode }}</VCardTitle>
<VCardTitle
>{{ props.info?.media.title || props.info?.name }}
{{ props.info?.season_episode }}</VCardTitle
>
<VCardSubtitle class="break-all whitespace-normal line-clamp-2 overflow-hidden text-ellipsis ...">
<VCardSubtitle
class="break-all whitespace-normal line-clamp-2 overflow-hidden text-ellipsis ..."
>
{{ props.info?.title }}
</VCardSubtitle>