vue-treeview
A multi-select component with nested options support for Vue.js
Features
- Single & multiple select with nested options support
- Fuzzy matching
- Async searching
- Delayed loading (load data of deep level options only when needed)
- Keyboard support (navigate using Arrow Up & Arrow Down keys, select option using Enter key, etc.)
- Rich options & highly customizable
- Supports a wide range of browsers (see below)
Requires Vue 2.2+
Getting Started
It's recommended to install vue-treeview via npm, and build your app using a bundler like webpack.
npm install --save @tomatobobot/vue-treeview
This example shows how to integrate vue-treeselect with your Vue SFCs.
<template> <div id="app"> <treeselect v-model="value" :multiple="true" :options="options" /> div> template> <script> // import the component import Treeselect from '@riophae/vue-treeselect' // import the styles import '@riophae/vue-treeselect/dist/vue-treeselect.css' export default { // register the component components: { Treeselect }, data() { return { // define the default value value: null, // define options options: [ { id: 'a', label: 'a', children: [ { id: 'aa', label: 'aa', }, { id: 'ab', label: 'ab', } ], }, { id: 'b', label: 'b', }, { id: 'c', label: 'c', } ], } }, } script>