vuetify-draggable-treeview is a tree view component of the Vuetify framework that allows the user to reorder parent and child nodes by dragging and dropping.
mui draggable treeview, vuetify treeview example, vue treeview expand all, mui draggable list, vuetify draggable
Awfully Basic JavaScript Treeview Component Library
How to make use of it:
Install and download:
# Yarn $ yarn add vuedraggable # NPM $ npm i vuedraggable --save
1. Install and import the component.
import VuetifyDraggableTreeview from 'vuetify-draggable-treeview' Vue.use(VuetifyDraggableTreeview)
2. Add the draggable tree view component to the template.
<template> <v-draggable-treeview group="example" v-model="items" ></v-draggable-treeview> </template>
3. Add nodes to the tree view.
export default { data() { return { items: [{ id: 1, name: "node-1", children: [{ id:11, name: "node1-1" }] }] } } }
API
Currently, this component dose not support all original v-treeview
component’s props, slots, event.
Props
Name | Type | Default | Description |
---|---|---|---|
value | Object | [] | items for treeview. item-key , item-text , item-children are not customizable currently. value can be like { id: 1, name: "test", children: []} . |
group | string | null | group name for vuedraggable. If this props not provided, drag and drop are enabled only in children. |
expand-icon | string | ‘mdi-menu-down’ | mdi string for the expand icon. |
Events
Name | Value | Description |
---|---|---|
input | array | Emits the array of selected items when this value changes |
Slots
Name | Props | Description |
---|---|---|
append | { item: any, open: boolean } | Appends content after label |
label | { item: any, open: boolean } | Label content |
prepend | { item: any, open: boolean } | Prepends content before label |
Draggable Tree View, vuetify-draggable-treeview Plugin/Github
See Demo And Download
Official Website(suusan2go): Click Here
This superior jQuery/javascript plugin is developed by suusan2go. For extra Advanced Usage, please go to the official website.