# vue-quick-tree

> A simple, straightforward and mostly unopininoted tree vue component.

Latest version **1.0.6** (published 2021-07-21) · 0 weekly downloads

## Install

```sh
npm install vue-quick-tree
pnpm add vue-quick-tree
yarn add vue-quick-tree
bun add vue-quick-tree
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2021-07-21 |
| First published | 2021-07-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 45 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | ikeohachidi |
| Keywords | tree, recursive, hierachy, quick |

## Links

- npm: https://www.npmjs.com/package/vue-quick-tree
- Repository: https://github.com/ikeohachidi/vue-quick-tree
- Homepage: https://github.com/ikeohachidi/vue-quick-tree#readme
- Issues: https://github.com/ikeohachidi/vue-quick-tree/issues
- npm.io page: https://npm.io/package/vue-quick-tree

## Dependencies (4)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [core-js](https://npm.io/package/core-js.md) ^3.6.5
- [vue-class-component](https://npm.io/package/vue-class-component.md) ^7.2.3
- [vue-property-decorator](https://npm.io/package/vue-property-decorator.md) ^9.1.2

## Recent versions

- 1.0.6 (latest) — 2021-07-21
- 1.0.5 — 2021-07-13
- 1.0.4 — 2021-07-12
- 1.0.3 — 2021-07-12
- 1.0.2 — 2021-07-12
- 1.0.1 — 2021-07-10
- 1.0.0 — 2021-07-09
- 0.1.22 — 2021-07-09
- 0.1.21 — 2021-07-09
- 0.1.20 — 2021-07-09
- 0.1.19 — 2021-07-09
- 0.1.18 — 2021-07-09
- 0.1.17 — 2021-07-09
- 0.1.16 — 2021-07-09
- 0.1.15 — 2021-07-09
- … 15 more at https://npm.io/package/vue-quick-tree/versions

## README

# Vue Quick Tree

A simple, straightforward and mostly unopininoted tree vue component.


### Installation
```
npm i vue-quick-tree
```



In 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

```typescript
// 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**

---
_Source: https://npm.io/package/vue-quick-tree · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
