EasyUI 中combotree 默认不能选择父节点的实现方法
更新时间:2016年11月07日 10:23:49 投稿:jingxian
下面小编就为大家带来一篇EasyUI 中combotree 默认不能选择父节点的实现方法。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧
这需要添加如下字段就行,搜了半天,说什么判断是不是子节点什么的,都是胡扯!
onlyLeafCheck:true, //病因分类 $('#artReason').combotree({ width:200, method:'GET', //url: '${ctx}/business/dict/json/DicEtilolgy', data:DicEtilolgy_data, idField : 'id', textFiled : 'name', parentField : 'pid', animate:true, mode:'local', multiple: true, onlyLeafCheck:true, onbeforeselect:function(node){ debugger; alert(node.state); if(node.state){ $("#artReason").tree("unselect"); } }, onClick:function(data){ return; debugger; }, onLoadSuccess:function(node,data){ // $("#artReason").combotree('setValue',['11','12']); }, // onSelect : function(node) { // debugger; // if(parseInt(node.id)<10){ // $('#artReason').combotree('clear'); // return; // } // //返回树对象 // var tree = $(this).tree; // //选中的节点是否为叶子节点,如果不是叶子节点,清除选中 // var isLeaf = tree('isLeaf', node.target); // if (!isLeaf) { // //清除选中 // $('#artReason').combotree('clear'); // } // }, onChange:function(newValue, oldValue) { debugger; }, // filter:function(q,row){ // debugger; // var opts=$(this).combobox("options"); // return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配 // }, });
以上这篇EasyUI 中combotree 默认不能选择父节点的实现方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。
相关文章
Javascript技巧之不要用for in语句对数组进行遍历
Javascript技巧-不要用for in语句对数组进行遍历的一些原因分析,需要的朋友可以参考下。2010-10-10Jquery和angularjs获取check框选中的值的方法汇总
本文分别通过具体的实例向大家展示了jquery和angularjs获取获取check框选中的值的方法,非常的简单实用,有需要的小伙伴可以参考下2016-01-01fancybox1.3.1 基于Jquery的插件在IE中图片显示问题
JQuery的弹出窗口插件也很多了,例如Lightbox…这个我们介绍比较优秀的Plugin – Fancybox。2010-10-10jQuery中的read和JavaScript中的onload函数的区别
这篇文章主要介绍了jQuery中的read和JavaScript中的onload函数的区别,这两个函数在web编程中是最常用的,一定要搞清楚它们的区别,需要的朋友可以参考下2014-08-08jQuery插件AjaxFileUpload实现ajax文件上传
这篇文章主要为大家详细介绍了jQuery插件AjaxFileUpload实现ajax文件上传的相关资料,需要的朋友可以参考下2016-05-05
最新评论