Site > Add file tree

This commit is contained in:
brunosimon
2017-08-09 23:32:26 +02:00
parent 02a59ba5be
commit c7cf01747a
23 changed files with 950 additions and 20 deletions
@@ -0,0 +1,3 @@
<template src="./template.html"></template>
<script src="./script.js"></script>
<style src="./style.styl" lang="stylus"></style>
@@ -0,0 +1,24 @@
import FilesTreeFile from '@/components/files-tree-file'
export default
{
name: 'files-tree-folder',
components:
{
FilesTreeFile
},
props:
{
depth: { type: Number, default: 0 },
content: { type: Object }
},
created()
{
},
methods:
{
}
}
@@ -0,0 +1,7 @@
<div>
<div class="name" :style="{paddingLeft:depth * 20 + 'px'}">
{{ 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>