mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
优化文件浏览器样式,增加文件列表大小限制,调整文件导航器内边距
This commit is contained in:
@@ -171,12 +171,19 @@ function fileListUpdated(items: FileItem[]) {
|
|||||||
fileListItems.value = items
|
fileListItems.value = items
|
||||||
}
|
}
|
||||||
|
|
||||||
// 大小控制
|
// 外层DIV大小控制
|
||||||
const scrollStyle = computed(() => {
|
const scrollStyle = computed(() => {
|
||||||
return appMode
|
return appMode
|
||||||
? 'height: calc(100vh - 11.5rem - env(safe-area-inset-bottom) - 3.5rem)'
|
? 'height: calc(100vh - 11.5rem - env(safe-area-inset-bottom) - 3.5rem)'
|
||||||
: 'height: calc(100vh - 10.5rem - env(safe-area-inset-bottom)'
|
: 'height: calc(100vh - 10.5rem - env(safe-area-inset-bottom)'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 文件列表大小限制
|
||||||
|
const fileListStyle = computed(() => {
|
||||||
|
return appMode
|
||||||
|
? 'height: calc(100vh - 15.5rem - env(safe-area-inset-bottom) - 3.5rem)'
|
||||||
|
: 'height: calc(100vh - 14.5rem - env(safe-area-inset-bottom)'
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -212,6 +219,7 @@ const scrollStyle = computed(() => {
|
|||||||
:axios="axios"
|
:axios="axios"
|
||||||
:refreshpending="refreshPending"
|
:refreshpending="refreshPending"
|
||||||
:sort="sort"
|
:sort="sort"
|
||||||
|
:listStyle="fileListStyle"
|
||||||
@pathchanged="pathChanged"
|
@pathchanged="pathChanged"
|
||||||
@loading="loadingChanged"
|
@loading="loadingChanged"
|
||||||
@refreshed="refreshPending = false"
|
@refreshed="refreshPending = false"
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ const inProps = defineProps({
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
sort: String,
|
sort: String,
|
||||||
|
listStyle: String,
|
||||||
})
|
})
|
||||||
|
|
||||||
// 对外事件
|
// 对外事件
|
||||||
@@ -598,7 +599,7 @@ onMounted(() => {
|
|||||||
<!-- 目录和文件列表 -->
|
<!-- 目录和文件列表 -->
|
||||||
<VCardText v-else-if="dirs.length || files.length" class="p-0">
|
<VCardText v-else-if="dirs.length || files.length" class="p-0">
|
||||||
<VList subheader>
|
<VList subheader>
|
||||||
<VVirtualScroll :items="[...dirs, ...files]">
|
<VVirtualScroll :items="[...dirs, ...files]" :style="listStyle">
|
||||||
<template #default="{ item }">
|
<template #default="{ item }">
|
||||||
<VHover>
|
<VHover>
|
||||||
<template #default="hover">
|
<template #default="hover">
|
||||||
|
|||||||
@@ -420,7 +420,6 @@ function getIndentLevel(path: string, ancestorPath: string) {
|
|||||||
.tree-item {
|
.tree-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 6px 16px 6px 8px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color 0.2s ease;
|
transition: background-color 0.2s ease;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
@@ -444,6 +443,7 @@ function getIndentLevel(path: string, ancestorPath: string) {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
padding: 6px 0px 6px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.folder-content {
|
.folder-content {
|
||||||
@@ -454,6 +454,7 @@ function getIndentLevel(path: string, ancestorPath: string) {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
padding: 6px 16px 6px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.root-item {
|
.root-item {
|
||||||
|
|||||||
Reference in New Issue
Block a user