DOCTYPE html>
title>script>
script>
script>
script>
}.demo-tree-box{width:500px;height:200px;border:1px #eee solid;overflow-y:auto;
}.demo-input-tree{height:auto;width:100%;display:none;position:absolute;top:100%;background-color:#fff;z-index:100;max-height:400px;
}.layui-input{width:500px;cursor:pointer;
}
style>
head>
部门:label>
div>
div>
i>button>
div>
div>
div>
i>获取选中button>
i>设置节点勾选button>
i>实例重载button>
div>
div>
div>
div>
div>
Copyright©2019-2020, 本系统由@一如既往,提供技术支持!blockquote>
div>
div>
body>
//初始化
layui.use(['tree'],function() {vartree=layui.tree;//treeid
varinst1=tree.render({
elem:'#treeid',
id:'treeid',//定义索引
showCheckbox:true,//是否显示复选框
showLine:true,//是否开启连接线。默认 true,若设为 false,则节点左侧出现三角图标。
accordion:false,//是否开启手风琴模式,默认 false
onlyIconControl:false,//是否仅允许节点左侧图标控制展开收缩。默认 false
isJump:false,//是否允许点击节点时弹出新窗口跳转。默认 false
data: [{
id:'hg-100',
field:'1&#