开发环境
Dtree 提供 树状态 的数据结构展示

显示代码

								
							
嵌套数据格式

    显示代码

    								layui.use(['dtree'], function () {
    								    dtree = layui.dtree;
    								 
    								    dtree.render({
    								        elem: "#demoTree",
    								        initLevel: "1",
    								        method: 'get',
    								        url: "admin/data/dtree.json"
    								    });
    								});
    							
    嵌套数据格式

      显示代码

      								layui.use(['dtree'], function () {
      								    dtree = layui.dtree;
      								 
      								    dtree.render({
      								        elem: "#demoTree",
      								        initLevel: "1",
      								        method: 'get',
      								        url: "admin/data/dtree.json",
      								        dataFormat: "list", 
      								        checkbar: true
      								    });
      								});
      							
      下拉树

        显示代码

        								layui.use(['dtree'], function () {
        								    dtree = layui.dtree;
        								 
        								    dtree.render({
        								        elem: "#demoTree2",
        								        initLevel: "1",
        								        method: 'get',
        								        url: "admin/data/dtree.json",
        								        select: true
        								    });
        								});