Skip to content

jumplee/treeSelect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##安装 引入js和css

    <link rel="stylesheet" href="lib/ztree/zTreeStyle.css"/>
    <link rel="stylesheet" href="dist/treeSelect.css"/>
    <script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.js"></script>
    <script src="lib/ztree/jquery.ztree.core-3.5.js"></script>
    <script src="dist/treeSelect.js"></script>

##使用

    var sexNode=[
        {
            name:'男',
            value:'1',
            children:[
                {
                    name:'好基友'
                }
            ]
        }  ,
        {
            name:'女',
            value:'2'
        }
    ];
    var sexInput=new TreeSelect({
        element:'#sex',
        data:sexNode
    });

##配置(option)

element:jquery选择器 data:ztree格式的数据源

##开发 1.使用babel来进行编译 需要先安装babel

2.执行bash


babel treeSelect.js  --out-file dist/treeSelect.js --source-maps --watch

About

基于ztree的一个树形下拉菜单

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published