0.3.0 • Published 7 months ago

@tenrok/liquor-tree v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Liquor Tree

Version License Vue.js GitHub last commit Downloads

A Vue tree component that allows you to present hierarchically organized data in a nice and logical manner.

documentation | demos

Features

  • drag&drop
  • mobile friendly
  • events for every action
  • flexible configuration
  • any number of instances per page
  • multi selection
  • keyboard navigation
  • filtering
  • sorting
  • integration with Vuex

Installation

Npm:

$ npm install @tenrok/liquor-tree

Yarn:

$ yarn add @tenrok/liquor-tree

Live Playground

To run that demo on your own computer:

  • Clone this repository
  • npm install
  • npm run build
  • npm run storybook
  • Visit http://localhost:9001/

There are a lot of examples for you. All sources of stories are located in liquor-tree/docs/storybook/stories.

Usage

  <!-- Vue Component -->
  <template>
    <liquor-tree
      :data="items"
      :options="options"
      ref="tree"
    />
  </template>

  <script>
    const LiquorTree = () => import('@tenrok/liquor-tree')

    export default {
      components: {
        LiquorTree
      },

      data() {
        return {
          items: [
            {text: 'Item 1'},
            {text: 'Item 2'},
            {text: 'Item 3', children: [
              {text: 'Item 3.1'},
              {text: 'Item 3.2'}
            ]}
          ],
          options: {
            checkbox: true
          }
        }
      }
      ...
    }
  </script>

Development

Check out the package.jsons script section. There are 2 scripts:

  • npm run dev - it will open browser and you can play with code
  • npm run build - it will craete a module file in production mode

License

MIT

0.3.0

7 months ago

0.2.71

7 months ago