EasyUI 中combotree 默认不能选择父节点
2015-08-17 16:42
477 查看
这需要添加如下字段就行,搜了半天,说什么判断是不是子节点什么的,都是胡扯!
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 datagrid 单元格编辑 自动聚焦 、全选
- UILabel使用自定义字体
- UIAutomator API浅析
- POJ 1019 Number Sequence (循环递增序列的的第K个值)
- POJ 1679 The Unique MST(判断最小生成树_Kruskal)
- 【CSS3 入门教程系列】CSS3 Media Queries 实现响应式设计
- 如何诊断RAC系统中的gc cr multi block request
- String,StringBuffer,StringBuilder以及线程安全性
- android stuio修改代码参考线和智能换行
- ArcServer10 安装中提示The following features cannot not be installed due to missing prerequisites"
- UITextView高度随文字自动增加
- iOS基础-UIKit框架-多控制器管理-实例:私人通讯录
- [LeetCode] Single Number III ( a New Questions Added today)
- android studio 新建项目 界面一直停在 【“building ‘ 项目名’ gradle project info”】
- UITableView使用详解
- [Leetcode] Longest Consecutive Sequence
- ZOJ 3210 A Stack or A Queue ? 水
- HDFS列式存储Parquet与行式存储(Avro)性能测试-Benchmark(hadoop, Spark, Scala)
- 【CF 570D】Tree Requests
- IOS UItableView得到group如何摆脱的剪裁线条样式问题