This commit is contained in:
jxxghp
2023-06-30 21:53:00 +08:00
parent 5e49219f28
commit 15c8a2f1ef
3 changed files with 15 additions and 18 deletions
+1
View File
@@ -16,6 +16,7 @@ body,
.layout-vertical-nav, .layout-navbar { .layout-vertical-nav, .layout-navbar {
padding-top: env(safe-area-inset-top); padding-top: env(safe-area-inset-top);
padding-bottom: env(safe-area-inset-bottom);
} }
.layout-page-content { .layout-page-content {
+1 -2
View File
@@ -75,11 +75,10 @@ import MediaCardSlideView from "@/views/discover/MediaCardSlideView.vue";
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
color: inherit;
font-size: 1.25rem; font-size: 1.25rem;
font-weight: 700; font-weight: 700;
line-height: 1.75rem; line-height: 1.75rem;
transition-duration: 0.3s; transition-duration: 0.3s;
@apply text-gray-600;
} }
</style> </style>
+13 -16
View File
@@ -6,12 +6,12 @@ import { onMounted, ref } from "vue";
// 表头 // 表头
const headers = [ const headers = [
{ title: "标题", key: "title" }, { title: "标题", key: "title" },
{ title: "目录", key: "src"}, { title: "目录", key: "src" },
{ title: "转移方式", key: "mode"}, { title: "转移方式", key: "mode" },
{ title: "时间", key: "date"}, { title: "时间", key: "date" },
{ title: "状态", key: "status"}, { title: "状态", key: "status" },
{ title: "失败原因", key: "errmsg"}, { title: "失败原因", key: "errmsg" },
{ title: "", key: "actions", sortable: false}, { title: "", key: "actions", sortable: false },
]; ];
// 数据列表 // 数据列表
@@ -39,18 +39,17 @@ const getIcon = (type: string) => {
// 计算颜色 // 计算颜色
const getStatusColor = (status: boolean) => { const getStatusColor = (status: boolean) => {
return status ? 'success' : 'error'; return status ? "success" : "error";
}; };
// 加载时获取数据 // 加载时获取数据
onMounted(fetchData); onMounted(fetchData);
</script> </script>
<template> <template>
<VCard title="历史记录" class="pb-5"> <VCard title="历史记录" class="pb-5">
<VDataTable <VDataTable
:headers="headers" :headers="headers"
:items="dataList" :items="dataList"
fixed-header fixed-header
show-select show-select
@@ -62,7 +61,7 @@ onMounted(fetchData);
<div class="d-flex"> <div class="d-flex">
<VAvatar><VIcon :icon="getIcon(item.raw.type || '')"></VIcon></VAvatar> <VAvatar><VIcon :icon="getIcon(item.raw.type || '')"></VIcon></VAvatar>
<div class="d-flex flex-column ms-1 text-high-emphasis"> <div class="d-flex flex-column ms-1 text-high-emphasis">
<span class="d-block"> <span class="d-block whitespace-nowrap">
{{ item.raw.title }} {{ item.raw.seasons }}{{ item.raw.episodes }} {{ item.raw.title }} {{ item.raw.seasons }}{{ item.raw.episodes }}
</span> </span>
<small>{{ item.raw.category }}</small> <small>{{ item.raw.category }}</small>
@@ -70,14 +69,14 @@ onMounted(fetchData);
</div> </div>
</template> </template>
<template #item.src="{ item }"> <template #item.src="{ item }">
<small>{{ item.raw.src }} <br>=> {{ item.raw.dest }}</small> <small>{{ item.raw.src }} <br />=> {{ item.raw.dest }}</small>
</template> </template>
<template #item.mode="{ item }"> <template #item.mode="{ item }">
<VChip variant="outlined" color="primary" size="small">{{ item.raw.mode }}</VChip> <VChip variant="outlined" color="primary" size="small">{{ item.raw.mode }}</VChip>
</template> </template>
<template #item.status="{ item }"> <template #item.status="{ item }">
<VChip :color="getStatusColor(item.raw.status)" size="small"> <VChip :color="getStatusColor(item.raw.status)" size="small">
{{ item.raw.status ? '成功' : '失败' }} {{ item.raw.status ? "成功" : "失败" }}
</VChip> </VChip>
</template> </template>
<template #item.date="{ item }"> <template #item.date="{ item }">
@@ -89,9 +88,7 @@ onMounted(fetchData);
<template #item.actions="{ item }"> <template #item.actions="{ item }">
<MoreBtn /> <MoreBtn />
</template> </template>
<template #no-data> <template #no-data> 没有数据 </template>
没有数据
</template>
</VDataTable> </VDataTable>
</VCard> </VCard>
</template> </template>