Skip to content

Commit e348e46

Browse files
committed
feat: Open the first level directory by default
1 parent 63724a3 commit e348e46

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • ui/src/components/folder-virtualized-tree

ui/src/components/folder-virtualized-tree/HeTree.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@click:node="handleNodeClick"
99
@after-drop="onAfterDrop"
1010
:rootDroppable="false"
11-
@enter="enter"
11+
:statHandler="statHandler"
1212
>
1313
<template #default="{ node, stat }">
1414
<div
@@ -103,6 +103,10 @@ function onAfterDrop() {
103103
emit('node-drop', args[0], args[1], args[2])
104104
}
105105
}
106+
const statHandler = (stat: any) => {
107+
stat.open = stat.level === 1
108+
return stat
109+
}
106110
</script>
107111

108112
<style lang="scss">

0 commit comments

Comments
 (0)