@bbones1967/atree
Components for incremental search in tree-like structured REST services
667
| Install | |
|---|---|
npm install @bbones1967/atree |
|
| Latest Version: | 0.1.15 |
| Vue: | 2 |
| License: | MIT |
| Last Updated: | Sep 12, 2021 |
| Links: | GitHub · npm |
Maintainer: bbones1967
ATree
Simple async tree structure viewer with additional search component
Use
Example:
https://github.com/bbones/atree-demo
<SearchBar :searcher="searcher" @select="onSelect"></SearchBar>
<ATree
:loader="loader"
:path="[]"
:highlight="highlight"
@nodeClicked="onNodeClicked">
</ATree>
SearchBar
Props
- searcher - function with api call for incremental search. Returns array of nodes
- prompt - string parameter for prompt default "Search: "
Events
- select event in search results list
Atree
Props
- loader(parent_id) - function api call loading nodes by given parent_id. Returns array
- highlight - array of node ids from root to particular node that will be expanded and shown
Events
- nodeClicked occurs when user clicks a node text
- nodeContextMenu occurs when user clicks right mouse or hold tap a node text
Node states
- isLoaded - false before emit
- isVisible - show
Project setup
npm install
Compiles example and hot-reloads for development
npm run serve
Lints and fixes files
npm run lint
Related Packages
vue-tree-list-new
A vue component for tree structure. Support adding treenode/leafnode, editing no...
902
1
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.1.15 | ^2.6.14 | MIT | |
| 0.1.14 | ^2.6.14 | MIT | |
| 0.1.13 | ^2.6.14 | MIT | |
| 0.1.12 | ^2.6.14 | MIT | |
| 0.1.11 | ^2.6.14 | MIT | |
| 0.1.10 | ^2.6.14 | MIT | |
| 0.1.9 | ^2.6.14 | MIT | |
| 0.1.8 | ^2.6.14 | MIT | |
| 0.1.7 | ^2.6.14 | MIT | |
| 0.1.6 | ^2.6.14 | MIT | |
| 0.1.5 | ^2.6.14 | MIT | |
| 0.1.4 | ^2.6.14 | MIT | |
| 0.1.3 | ^2.6.14 | MIT | |
| 0.1.2 | ^2.6.14 | MIT | |
| 0.1.1 | ^2.6.14 | MIT | |
| 0.1.0 | ^2.6.14 |