By default everything closed
This commit is contained in:
@@ -84,9 +84,9 @@ function visibleChildren(node) {
|
|||||||
<button
|
<button
|
||||||
class="folder-toggle"
|
class="folder-toggle"
|
||||||
@click="toggle(node.path ?? node.title)"
|
@click="toggle(node.path ?? node.title)"
|
||||||
:aria-expanded="!collapsed[node.path ?? node.title]"
|
:aria-expanded="collapsed[node.path ?? node.title]"
|
||||||
>
|
>
|
||||||
<span class="chevron" :class="{ open: !collapsed[node.path ?? node.title] }">›</span>
|
<span class="chevron" :class="{ open: collapsed[node.path ?? node.title] }">›</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Folder label: clickable link if there's a self-titled child, plain text otherwise -->
|
<!-- Folder label: clickable link if there's a self-titled child, plain text otherwise -->
|
||||||
@@ -102,7 +102,7 @@ function visibleChildren(node) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TreeNode
|
<TreeNode
|
||||||
v-if="!collapsed[node.path ?? node.title]"
|
v-if="collapsed[node.path ?? node.title]"
|
||||||
:nodes="visibleChildren(node)"
|
:nodes="visibleChildren(node)"
|
||||||
:depth="depth + 1"
|
:depth="depth + 1"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user