classifier-vue-treeview
v0.0.18
Published
Only for es module, only for Postgres ltree data
Downloads
24
Readme
Classifier
Only for es module, only for Postgres ltree data
Integration
Download
npm i classifier-vue-treeview
Params object
- getUrl: url for get
- postClassifierUrl: url for post
- delUrl: url for delete, default: postClassifierUrl
- selectedIds: array of id's to be drawn initially
- path: tree line, default: 'tree_path'
- search: if the classifier is used for searching, type: Boolean, default: false
- test: run with test data, type: Boolean, default: false
- isRootSelectable: ability to select a root classifier, type: Boolean, default: true
- defaultExpandAll: open all branches by default
Example
import css
@import "classifier-vue-treeview/dist/assets/main";
create html element
<div id="test"></div>
create instance
import {C as Classifier} from 'classifier-vue-treeview'
const classifier = new Classifier('#app', {
getUrl: 'http://0.0.0.0:3333/classifiers',
postClassifierUrl: 'http://0.0.0.0:3333/classifiers',
path: 'tree_path',
// search: true,
selectedIds: ['1'],
defaultExpandAll: true
// isRootSelectable: false
})
API
- findById(id) - returns html element bound to id