1.0.6 • Published 5 years ago
vue-quick-tree v1.0.6
Vue Quick Tree
A simple, straightforward and mostly unopininoted tree vue component.
Installation
npm i vue-quick-treeIn your main.ts file
import VueQuickTree from 'vue-quick-tree'
Vue.component('vue-quick-tree', VueQuickTree)Usage
<template>
<vue-quick-tree v-model="tree">
<template #node="{ node }">
<span v-if="node.type === 'folder'">📁 {{ node.name }}</span>
<span v-else>{{ node.name }}</span>
</template>
</vue-quick-tree>
</template>
<script>
export default {
data() {
return {
tree: [
{
name: 'stuff'
type: 'folder'
children: [],
validator: (dropLocation, dragLocation) => {}
}
]
}
}
}
</script>Props
| Name | Type | Description |
|---|---|---|
| indentLevel | number | indent size of the node |
| border | BorderConfig (see below) | indent line style |
| allowDragNDrop | boolean | determines if drag n drop will enabled |
// BorderConfig
{
show: boolean;
type: 'dashed' | 'solid';
color: string;
width: number;
}The expected structure is a recursive array. Feel free to add any thing property you want to add into the object.
Note: The children property is required to have the nested structure
1.0.6
5 years ago
1.0.5
5 years ago
1.0.2
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.1.14
5 years ago
0.1.15
5 years ago
0.1.20
5 years ago
0.1.21
5 years ago
0.1.22
5 years ago
0.1.16
5 years ago
0.1.17
5 years ago
0.1.18
5 years ago
0.1.19
5 years ago
0.1.10
5 years ago
0.1.11
5 years ago
0.1.12
5 years ago
0.1.13
5 years ago
0.1.2
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.9
5 years ago
0.1.4
5 years ago
0.1.3
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago