1
- # tree.el
1
+ # & lt ; u1-tree1 & gt ; - element
2
2
treeview component (beta)
3
3
4
4
## Ussage
5
+
5
6
``` html
6
- <u1-tree1 >
7
- <u1-tree1 >
8
- Folder 1
9
- <u1-tree1 >
10
- <span slot =icon >📄</span >
11
- File 1.1
12
- </u1-tree1 >
7
+ <u1-tree1 aria-expanded =true >root
8
+ <u1-tree1 aria-expanded =true >Folder 1
9
+ <u1-tree1 >File 1.1</u1-tree1 >
10
+ <u1-tree1 >File 1.2</u1-tree1 >
13
11
</u1-tree1 >
14
- <u1-tree1 >
15
- <span slot = icon >📄</ span >
16
- File 3
12
+ <u1-tree1 >Folder 3
13
+ <u1-tree1 >File 3.1</ u1-tree1 >
14
+ < u1-tree1 > File 3.2</ u1-tree1 >
17
15
</u1-tree1 >
18
16
</u1-tree1 >
19
- ```
17
+ ```
20
18
21
19
## Settings
22
20
@@ -32,7 +30,6 @@ This is either not expandable or like aria-expanded="false" if it has children.
32
30
This indicates, that the node has to be loaded.
33
31
The ` u1-tree1-collapse ` event will get a property ` event.load(promise) ` to load their children.
34
32
35
-
36
33
## Events
37
34
38
35
### expand / collapse
@@ -49,15 +46,33 @@ treeElement.addEventListener('u1-tree1-select', (e) => { ... });
49
46
```
50
47
51
48
## API
49
+
52
50
``` js
53
51
el .select ();
54
52
el .toggleExpand (true / false );
55
53
```
56
54
55
+ ## Demos
57
56
57
+ https://raw.githack.com/u1ui/tree1.el/main/tests/custom.html
58
+ https://raw.githack.com/u1ui/tree1.el/main/tests/minimal.html
59
+ https://raw.githack.com/u1ui/tree1.el/main/tests/test.html
60
+
61
+ ## Install
62
+
63
+ ``` html
64
+ <link href =" https://cdn.jsdelivr.net/gh/u1ui/tree1.el@1.0.0/tree1.min.css" rel =stylesheet >
65
+ <script src =" https://cdn.jsdelivr.net/gh/u1ui/tree1.el@1.0.0/tree1.min.js" type =module >
66
+ ` ` `
67
+
68
+ ## Demo
58
69
59
- ## Demos
60
70
https://raw.githack.com/u1ui/tree1.el/main/tests/custom.html
61
71
https://raw.githack.com/u1ui/tree1.el/main/tests/minimal.html
62
72
https://raw.githack.com/u1ui/tree1.el/main/tests/test.html
63
73
74
+ ## About
75
+
76
+ - MIT License, Copyright (c) 2022 <u1> (like all repositories in this organization) <br>
77
+ - Suggestions, ideas, finding bugs and making pull requests make us very happy. ♥
78
+
0 commit comments