EasyUI Combotree 只允许选择 叶子节点

 $("#SDID").combotree({
            url: '/Ajax/GetDeptTree.aspx?level=4&pid=-1',

            onSelect: function (node) {
                //if (record.attributes.nodetype != 4) {
                //    return false;
                //}
                //返回树对象  
                var tree = $(this).tree;
                //选中的节点是否为叶子节点,如果不是叶子节点,清除选中  
                var isLeaf = tree('isLeaf', node.target);
                if (!isLeaf) {
                    //清除选中  
                    $('#SDID').combotree('clear');
                }
            },
            onLoadSuccess: function (node, data) {
            }
        });
原文地址:https://www.cnblogs.com/cyehu/p/4350166.html