0.1.7 • Published 4 years ago

vue-bootstrap3-simple-tree v0.1.7

Weekly downloads
9
License
MIT
Repository
github
Last release
4 years ago

Simple Tree

Since a simple bootstrap 3 tree style is needed, I create this library for my use. This Tree will read an array of trees, and reply an array of id from the selected "target" nodes.

Simple Demo: Demo

Usage

Define the tree structure by the following, specify the target node by adding type: "target"

[
  {
    id: "Tree1",
    text: "This is tree 1",
    children: [
      {
        id: "Tree1-1",
        text: "This is subtree 1",
        children: [
          {
            id: "Tree1-1-1",
            type: "target",
            text: "This is subtree 1-1",
          },
          {
            id: "Tree1-1-2",
            type: "target",
            text: "This is subtree 1-2",
          },
        ],
      },
      {
        id: "Tree1-2",
        type: "target",
        text: "This is subtree 2",
      },
    ],
  },
]

Then pass the tree by data and get the selected nodes by v-model

<simple-tree :data="tree" v-model="selected" />
0.1.7

4 years ago

0.1.6

4 years ago

0.1.4

4 years ago

0.1.5

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago