Skip to content

zhujiancc/jtree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

j-tree

A Vue.js project of Tree

How to use it

npm install j-tree --save 
import Tree from 'j-tree'

Vue.component('tree',Tree)
<tree :tree="treeArr" :options="optionsObj"></tree>

Props Introduce

  • tree : A array data ,must contain 'id , name , check , children' like:
tree:[
  {
    name:'root',
    check:false,
    id:1,
    children:[
      {
        name:'node',
        check:false,
        id:2
      }
    ]
  }
],
  • options : some tree setting =>
{
  edit:true,// tree can be modified when it open
  del:true // tree can be deleted when it open 
}
  • lang : set different languages=>
//zh-cn
{
  addRoot: "新增根节点",
  delete: "删除",
  edit: "编辑",
  addNode:"添加新节点",
  newNode:"子节点",
  newRoot:"根节点",
  empty:"内容不可为空!!"
};
//en
{
  addRoot: "Add new root",
  delete: "Delete",
  edit: "Edit",
  addNode:"Add new node",
  newNode:"New Node",
  newRoot:"New Root",
  empty:"Content cannot be empty !"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published