EasyUI Combotree 只允许选择 叶子节点
2015-03-19 13:38 CodeCy 阅读(564) 评论(0) 编辑 收藏 举报$("#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) { } });