Site > File tree > Add icons

This commit is contained in:
brunosimon
2017-08-15 19:44:49 +02:00
parent a17672ae21
commit 72a95b8904
36 changed files with 543 additions and 5 deletions
@@ -1,17 +1,20 @@
import FileIcon from '@/components/file-icon/'
export default
{
name: 'files-tree-file',
components:
{
FileIcon
},
props:
{
depth: { type: Number, default: 0 },
content: { type: Object }
},
created()
{
},
methods:
{
onNameClick()
@@ -0,0 +1,9 @@
.icon
display inline-block
width 12px
height 12px
img
display inline-block
width 100%
height 100%
@@ -1,5 +1,8 @@
<div>
<a href="#" class="name" :style="{ paddingLeft:depth * 20 + 'px' }" @click.prevent="onNameClick">
{{ content.name }}
<file-icon class="icon" :extension="content.data.extension"></file-icon>
<span class="text">
{{ content.name }}
</span>
</a>
</div>