diff --git a/src/components/cards/DownloadingCard.vue b/src/components/cards/DownloadingCard.vue index cadc503f..124e02a3 100644 --- a/src/components/cards/DownloadingCard.vue +++ b/src/components/cards/DownloadingCard.vue @@ -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 = () => {
- +
- {{ props.info?.media.title || props.info?.name }} - {{ props.info?.season_episode }} + {{ props.info?.media.title || props.info?.name }} + {{ props.info?.season_episode }} - + {{ props.info?.title }}