Tree( 树) 组件[3]
本节课重点了解 EasyUI 中 Tree(树)组件的使用方法, 这个组件依赖于 Draggable(拖
动)和 Droppable(放置)组件。
一. 事件列表
很多事件的回调函数都包含'node'参数,其具备如下属性:
id:绑定节点的标识值。
text:显示的节点文本。
iconCls:显示的节点图标 CSS 类 ID。
checked:该节点是否被选中。
state:节点状态,'open' 或 'closed'。
attributes:绑定该节点的自定义属性。
target:目标 DOM 对象。


//部分事件
$('#box').tree({
url : 'tree.php',
lines : true,
checkbox : true,
onlyLeafCheck : true,
dnd : true,
onClick : function (node) {
console.log(node);
},
onDblClick : function (node) {
console.log(node);
},
onBeforeLoad : function (node, param) {
console.log(node);
console.log(param);
//return false;
},
onBeforeLoad : function (node,param) {
console.log(node);
console.log(param);
},
onLoadError : function (arguments) {
console.log(arguments);
},
onBeforeExpand : function (node) {
console.log(node);
},
onExpand : function (node) {
console.log(node);
},
onBeforeCollapse : function (node) {
console.log(node);
},
onCollapse : function (node) {
console.log(node);
},
onBeforeCheck : function (node) {
console.log(node);
},
onCheck : function (node, checked) {
console.log(node);
console.log(checked);
},
onBeforeSelect : function (node) {
console.log(node);
},
onContextMenu: function(e, node){
e.preventDefault();
// 查找节点
$('#box').tree('select', node.target);
// 显示快捷菜单
$('#menu').menu('show', {
left: e.pageX,
top: e.pageY
});
}
onBeforeDrag : function (node) {
console.log(node);
},
onDragEnter : function (target, source) {
console.log(target);
console.log(source);
},
onBeforeDrop : function (target, source, point) {
console.log(target);
console.log(source);
console.log(point);
},
});
Tree( 树) 组件[3]的更多相关文章
- Tree( 树) 组件[4]
本节课重点了解 EasyUI 中 Tree(树)组件的使用方法, 这个组件依赖于 Draggable(拖动)和 Droppable(放置)组件.一.方法列表 //部分方法onClick : funct ...
- Tree( 树) 组件[2]
本节课重点了解 EasyUI 中 Tree(树)组件的使用方法, 这个组件依赖于 Draggable(拖动)和 Droppable(放置)组件.一. 异步加载如果想从数据库里获取导航内容, 那么就必须 ...
- Tree( 树) 组件[1]
本节课重点了解 EasyUI 中 Tree(树)组件的使用方法, 这个组件依赖于 Draggable(拖动)和 Droppable(放置)组件. 一. 加载方式//class 加载方式<ul c ...
- 第二百二十六节,jQuery EasyUI,Tree(树)组件
jQuery EasyUI,Tree(树)组件 本节课重点了解 EasyUI 中 Tree(树)组件的使用方法,这个组件依赖于 Draggable(拖 动)和 Droppable(放置)组件. 一.加 ...
- element-ui的Tree树组件使用技巧
目录 1,前言 2,需求 3,解决思路 4,完整代码 5,总结 1,前言 最近这段时间在做一个新的模块,其中有一个三层的树结构,产品经理提出了一个很古怪的需求,整的我只能自己控制树的交互,写完之后,感 ...
- EasyUI - Tree 树组件
效果: 数据库设计: 使用的数据: 其中的字段,是跟据要生成的树节点的属性定义的. text:代表要显示的字段名称. state:是否是目录节点. iconCls:节点的图标是什么. url:跳转的链 ...
- 基于HTML5树组件延迟加载技术实现
HT for Web的HTML5树组件有延迟加载的功能,这个功能对于那些需要从服务器读取具有层级依赖关系数据时非常有用,需要获取数据的时候再向服务器发起请求,这样可减轻服务器压力,同时也减少了浏览器的 ...
- HT for Web的HTML5树组件延迟加载技术实现
HT for Web的HTML5树组件有延迟加载的功能,这个功能对于那些需要从服务器读取具有层级依赖关系数据时非常有用,需要获取数据的时候再向服务器发起请求,这样可减轻服务器压力,同时也减少了浏览器的 ...
- GUI树组件,表格
树组件首先要new一个JTree,再加结点,然后添加到 JScrollPane JTree tree1=new JTree(); //.......添加节点 add(new ScrollPane(tr ...
随机推荐
- solr集群solrCloud的搭建
上一章讲了solr单机版的搭建,本章将讲解sole集群的搭建.solr集群的搭建需要使用到zookeeper,搭建参见zookeeper集群的安装 一.solr实例的搭建 1. tomcat安装 这里 ...
- XML DOM 总结一
对这个基本概念我不介绍太多,无非就是一定格式的文本而已,我现在侧重于如何使用它. 首先看看.NET对它的支持. 首先看看这个类图: 所有的都是基于Xm ...
- 关于laravel框架的Auth::attempt验证失败
按照官方文档进行认证 发现不管怎么样都是失败 if (Auth::attempt(array('email' => $email, 'password' => $password), tr ...
- 【PHP】新浪、淘宝的地区 API调用
/推荐使用新浪的: $ch = curl_init(); $url = "http://ip.dpool.sina.com.cn/iplookup/iplookup.php?format=j ...
- v9站点自定义变量
打开 \phpcms\modules\admin\templates\site_edit.tpl.php 文件,找到最后一个 </fieldset> ,在他后面添加一下代码:<!-- ...
- Apache Rewrite 拟静态配置54
mod_rewrite 规则的使用 RewriteEngine on RewriteCond %{HTTP_HOST} !^www.php100.com [NC] RewriteRule ^/ ...
- 游戏算法中lua脚本详解
此外,函数本身也是一个变量,比如: dp@dp:~ % cat test.lua local mylen={} mylen.len3=function (x,y,z) return math.sqrt ...
- 2017-1-9css
2017-1-9css css border-image详解 http://www.360doc.com/content/14/1016/13/2792772_417403574.shtml 最简单的 ...
- 获取MP3和M4A音乐文件的歌曲信息以及专辑图片--备用
NSBundle* bundle = [NSBundle mainBundle]; NSString* path = [bundle bundlePath]; NSURL * file ...
- IE中对于stylesheet的个数限制
对于IE6-9: 1.样式规则最多只能有4095个,多于这个数目的会被忽略: 2.样式表(通过@import, <link> 或 <style>)最多可以有31个(总和),多于 ...