https://github.com/litten/folder2tree
Show your folder structure with tree nodes. 用树形节点展示文件夹结构。
https://github.com/litten/folder2tree
Last synced: 10 months ago
JSON representation
Show your folder structure with tree nodes. 用树形节点展示文件夹结构。
- Host: GitHub
- URL: https://github.com/litten/folder2tree
- Owner: litten
- Created: 2014-07-29T02:03:32.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-08-14T02:53:12.000Z (almost 12 years ago)
- Last Synced: 2025-05-04T20:40:58.245Z (over 1 year ago)
- Language: JavaScript
- Size: 172 KB
- Stars: 30
- Watchers: 3
- Forks: 19
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#folder2tree
用树形节点展示文件夹结构。
Show your folder structure with tree nodes.
### 使用 Usage:
@param {Dom} 父级dom节点
@param {Array} 描述文件夹层级关系对象
```js
folder2tree.init(document.getElementById("ctn"), [
{
"img" : [
"sprite.png",
"bg.png"
]
},{
"js": [{
"common": [
"jquery.js",{
"highcharts": [{
"modules": ["exporting.js"]
},
"highcharts.js"
]}
]
},{
"index": [
"mian.js",{
"modules": ["mod.video.js"]
}
]
}]
},{
"css": [
"base.css",
"index-main.css",
"index-video.css"
]
},
"index.html",
"favicon.ico"
]);
```
### 展示 Show:
```
├─img
│ ├─sprite.png
│ └─bg.png
├─js
│ ├─common
│ │ ├─jquery.js
│ │ └─highcharts
│ │ ├─modules
│ │ │ └─exporting.js
│ │ └─highcharts.js
│ └─index
│ ├─mian.js
│ └─modules
│ └─mod.video.js
├─css
│ ├─base.css
│ ├─index-main.css
│ └─index-video.css
├─index.html
└─favicon.ico
```