优化文件浏览器组件,修复目录树切换逻辑

This commit is contained in:
jxxghp
2025-04-03 08:23:07 +08:00
parent 12356abf00
commit e3a385c989
2 changed files with 15 additions and 17 deletions
+10 -13
View File
@@ -168,7 +168,7 @@ function sortChanged(s: string) {
// 切换目录树
function switchDirTree(state: boolean) {
showDirTree.value = !state
showDirTree.value = state
}
// 文件列表
@@ -210,18 +210,15 @@ const fileListStyle = computed(() => {
@sortchanged="sortChanged"
/>
<div class="flex" :style="scrollStyle">
<VSlideXTransition v-if="showDirTree">
<div>
<FileNavigator
:storage="activeStorage"
:currentPath="item.path"
:items="fileListItems"
:endpoints="endpoints"
:axios="axios"
@navigate="pathChanged"
/>
</div>
</VSlideXTransition>
<FileNavigator
v-if="showDirTree"
:storage="activeStorage"
:currentPath="item.path"
:items="fileListItems"
:endpoints="endpoints"
:axios="axios"
@navigate="pathChanged"
/>
<FileList
class="flex-grow"
:item="item"