Skip to content

falseLuffy/c-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

基于vue开发的树形图

可选参数

   data:Array  [{name:'',children:[]}]
   property:Object  {name:'name',children:'children'}
   icon:

使用方法:

   <c-tree :data="data" :property="property"></tree>

   import CTree from './c-tree.js';

   {
    components:{
       CTree
    }
   }

   <script src="./c-tree.js"></script>
   <script>
    Vue.component('demo',{
        template:'<div>'+
         '<c-tree :data="data" :property="property"></tree>'+
        '</div>',
        data:function(){
            return {
              data:[
                      {
                         name: '开始开始开',
                         childrens: [
                            {
                               name: '开始2',
                               childrens: [
                                  {
                                     name: '开始2'
                                  },
                                  {
                                     name: '开始2'
                                  },
                               ]
                            },
                            {
                               name: '开始2',
                               childrens: [
                                  {
                                     name: '开始2'
                                  },
                                  {
                                     name: '开始2'
                                  },
                               ]
                            },
                            {
                               name: '开始2'
                            },
                            {
                               name: '开始2'
                            },
                         ]
                      },
                      {
                         name: '开始开始开始开始开始开始开始',
                         childrens: [
                            {
                               name: '开始2'
                            },
                            {
                               name: '开始2'
                            }
                         ]
                      },
                   ],
                 property:{name:'name',children:'children'}  
            }
        }
    })
   </script>

About

基于vue开发的树形图;点击

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published