Site > File Tree > Add folder toggle

This commit is contained in:
brunosimon
2017-08-09 23:54:53 +02:00
parent c7cf01747a
commit 5cac120de2
8 changed files with 26 additions and 26 deletions
@@ -1,7 +1,9 @@
<div>
<div class="name" :style="{paddingLeft:depth * 20 + 'px'}">
<div class="name" :style="{ paddingLeft:depth * 20 + 'px' }" @click.prevent="onNameClick">
{{ content.name }}
</div>
<files-tree-folder v-for="folder of content.folders" :key="+ new Date()" :content="folder" :depth="depth + 1"></files-tree-folder>
<files-tree-file v-for="file of content.files" :key="+ new Date()" :content="file" :depth="depth + 1"></files-tree-file>
<div v-show="open">
<files-tree-folder v-for="folder of content.folders" :key="folder.name" :content="folder" :depth="depth + 1"></files-tree-folder>
<files-tree-file v-for="file of content.files" :key="file.data.path.full" :content="file" :depth="depth + 1"></files-tree-file>
</div>
</div>