0.1.4 • Published 2 years ago

vue-dir-tree-view v0.1.4

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

vue-dir-tree-view

Demo

Vue directory structure plugin

Render directories with files

Icons used: bootstrap icons

npm install vue-dir-tree-view
<template>
  <VueDirTreeView :config="config" @item-click="onclick" />
</template>
import VueDirTreeView from 'vue-dir-tree-view'

export default {
components: {
    VueDirTreeView
},
data(){
    return {
        config: {
            options: null,
            data: <exampledata>
        }
    },
},
methods: {
    onclick(item){
        console.log(item)
    }
}
/*
exampledata: [
    {
        "title": "multi-depth-dir",
        "children": [
            {
                "title": "one",
                "isLeaf": false,
                "children": [
                    {"title": "image.jpg", "isLeaf": true},
                    {"title": "image.mp3", "isLeaf": true},
                    {"title": "image.mp4", "isLeaf": true},
                    {"title": "spreadsheet.xlsx", "isLeaf": true},
                    {"title": "file.pdf", "isLeaf": true}
                ]
            },
            {
                "title": "two",
                "children": [
                    {
                        "title": "three",
                        "isLeaf": false,
                        "children": [
                            {"title": "file_example_GIF_500kB.gif", "isLeaf": true},
                            {"title": "file_example_JPG_100kB.jpg", "isLeaf": true},
                            {"title": "file_example_SVG_20kB.svg", "isLeaf": true},
                            {"title": "file-sample_100kB.rtf", "isLeaf": true},
                            {"title": "file-sample_500kB.odt", "isLeaf": true}
                        ]
                    },
                    {"title": "file_example_GIF_500kB.php", "isLeaf": true},
                    {"title": "file_example_JPG_100kB.js", "isLeaf": true},
                    {"title": "file_example_PNG_500kB.pptx", "isLeaf": true},
                    {"title": "file_example_XLSX_100.xlsx", "isLeaf": true}
                ],
                "isLeaf": false
            },
            {"title": "file_example_GIF_500kB.vmv", "isLeaf": true},
            {"title": "file_example_SVG_20kB.docx", "isLeaf": true},
            {"title": "file_example_TIFF_1MB.tiff", "isLeaf": true}
        ],
        "isLeaf": false
    }
]
*/
0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago