This commit is contained in:
jxxghp
2024-06-28 10:47:50 +08:00
parent 8b4ffa0795
commit 045c0b4c0c
3 changed files with 18 additions and 19 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ const transferItems = ref<FileItem[]>([])
// 大小控制 // 大小控制
const scrollStyle = computed(() => { const scrollStyle = computed(() => {
return appMode return appMode.value
? 'height: calc(100vh - 15.5rem - env(safe-area-inset-bottom) - 3.5rem)' ? 'height: calc(100vh - 15.5rem - env(safe-area-inset-bottom) - 3.5rem)'
: 'height: calc(100vh - 14.5rem - env(safe-area-inset-bottom)' : 'height: calc(100vh - 14.5rem - env(safe-area-inset-bottom)'
}) })
+10 -13
View File
@@ -1,6 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { Context } from '@/api/types' import type { Context } from '@/api/types'
import TorrentItem from '@/components/cards/TorrentItem.vue' import TorrentItem from '@/components/cards/TorrentItem.vue'
import { list } from 'postcss'
import { useDisplay } from 'vuetify' import { useDisplay } from 'vuetify'
// 显示器宽度 // 显示器宽度
@@ -35,6 +36,13 @@ const filterForm = reactive({
resolution: [] as string[], resolution: [] as string[],
}) })
// 列表样式
const listStyle = computed(() => {
return appMode.value
? 'height: calc(100vh - 7.5rem - env(safe-area-inset-bottom) - 3.5rem)'
: 'height: calc(100vh - 6.5rem - env(safe-area-inset-bottom)'
})
// 排序字段 // 排序字段
const sortField = ref('default') const sortField = ref('default')
@@ -167,14 +175,7 @@ onMounted(() => {
</VListItem> </VListItem>
</VList> </VList>
<VList v-if="dataList.length !== 0" lines="three" class="rounded p-0 torrent-list-vscroll shadow-lg"> <VList v-if="dataList.length !== 0" lines="three" class="rounded p-0 torrent-list-vscroll shadow-lg">
<VVirtualScroll <VVirtualScroll :items="dataList" :style="listStyle">
:items="dataList"
:style="
appMode
? 'height: calc(100vh - 7.5rem - env(safe-area-inset-bottom) - 3.5rem)'
: 'height: calc(100vh - 6.5rem - env(safe-area-inset-bottom)'
"
>
<template #default="{ item }"> <template #default="{ item }">
<TorrentItem :torrent="item" :key="`${item.torrent_info.page_url}`" /> <TorrentItem :torrent="item" :key="`${item.torrent_info.page_url}`" />
</template> </template>
@@ -182,11 +183,7 @@ onMounted(() => {
</VList> </VList>
</VCol> </VCol>
<VCol xl="2" md="3" v-if="display.mdAndUp.value"> <VCol xl="2" md="3" v-if="display.mdAndUp.value">
<VList <VList lines="one" class="rounded shadow-lg" :style="listStyle">
lines="one"
class="rounded shadow-lg"
style="block-size: calc(100vh - 6.5rem - env(safe-area-inset-bottom))"
>
<VListSubheader> 排序 </VListSubheader> <VListSubheader> 排序 </VListSubheader>
<VListItem> <VListItem>
<VChipGroup column v-model="sortField"> <VChipGroup column v-model="sortField">
+7 -5
View File
@@ -124,6 +124,12 @@ const TransferDict: { [key: string]: string } = {
rclone_move: 'Rclone移动', rclone_move: 'Rclone移动',
} }
const tableStyle = computed(() => {
return appMode.value
? 'height: calc(100vh - 15.5rem - env(safe-area-inset-bottom) - 3.5rem)'
: 'height: calc(100vh - 14.5rem - env(safe-area-inset-bottom)'
})
// 分页提示 // 分页提示
const pageTip = computed(() => { const pageTip = computed(() => {
const begin = itemsPerPage.value * (currentPage.value - 1) + 1 const begin = itemsPerPage.value * (currentPage.value - 1) + 1
@@ -394,11 +400,7 @@ onMounted(fetchData)
show-select show-select
loading-text="加载中..." loading-text="加载中..."
hover hover
:style=" :style="tableStyle"
appMode
? 'height: calc(100vh - 15.5rem - env(safe-area-inset-bottom) - 3.5rem)'
: 'height: calc(100vh - 14.5rem - env(safe-area-inset-bottom)'
"
> >
<template #item.title="{ item }"> <template #item.title="{ item }">
<div class="d-flex align-center"> <div class="d-flex align-center">