enhance the file browser

This commit is contained in:
stkevintan
2025-12-05 23:42:24 +08:00
parent 546c82ca40
commit 9fd29a2958
5 changed files with 132 additions and 71 deletions
+3 -4
View File
@@ -42,7 +42,7 @@ const availableHeight = computed(() => {
const props = defineProps({
storage: {
type: String,
default: 'local',
required: true,
},
currentPath: {
type: String,
@@ -223,7 +223,7 @@ watch(
watch(
() => props.items,
newItems => {
if (newItems && newItems.length > 0) {
if (newItems) {
// 过滤出目录项
const dirs = newItems.filter(item => item.type === 'dir')
@@ -284,7 +284,7 @@ onMounted(async () => {
})
onActivated(() => {
updateHeight()
// updateHeight()
})
</script>
@@ -309,7 +309,6 @@ onActivated(() => {
<span>{{ t('file.rootDirectory') }}</span>
</div>
</div>
<!-- 加载根目录 -->
<div v-if="loading['/']" class="tree-loading">
<VProgressCircular indeterminate size="24" color="primary" class="ma-2" />