@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>
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-jstree

a tree plugin for vue2

137,015 630
vue-tree-list-new

A vue component for tree structure. Support adding treenode/leafnode, editing no...

902 1
hu-tree

tree

636
vue-json-tree

Vue component that renders JSON data in a collapsible tree structure.

141,887 50
json-tree-view-vue3

JSON tree rendering Vue3 component

110,063 39

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