feat(docs): introduction of tree collection

This commit is contained in:
chenos 2023-03-17 10:51:02 +08:00
parent a9e5e14429
commit f9b034b283
12 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,45 @@
# Tree collection
## Collection options
```ts
{
name: 'categories',
tree: 'adjacency-list',
fields: [
{
type: 'belongsTo',
name: 'parent',
treeParent: true,
},
{
type: 'hasMany',
name: 'children',
treeChildren: true,
},
],
}
```
## UI
### Create tree collection
<img src="./tree-collection/tree-collection.jpg">
### Default fields
<img src="./tree-collection/init.jpg">
### Table block
<img src="./tree-collection/tree-table.jpg">
### Add child
<img src="./tree-collection/add-child.jpg">
### Expend/Collapse
<img src="./tree-collection/expend-collapse.jpg">

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -0,0 +1,45 @@
# Tree collection
## Collection options
```ts
{
name: 'categories',
tree: 'adjacency-list',
fields: [
{
type: 'belongsTo',
name: 'parent',
treeParent: true,
},
{
type: 'hasMany',
name: 'children',
treeChildren: true,
},
],
}
```
## UI
### Create tree collection
<img src="./tree-collection/tree-collection.jpg">
### Default fields
<img src="./tree-collection/init.jpg">
### Table block
<img src="./tree-collection/tree-table.jpg">
### Add child
<img src="./tree-collection/add-child.jpg">
### Expend/Collapse
<img src="./tree-collection/expend-collapse.jpg">

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB