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