easyUI的可编辑树
来源:互联网 发布:淘宝分享有赏红包 编辑:程序博客网 时间:2024/04/29 19:58
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>用户管理</title> <link rel="stylesheet" type="text/css" href="css/treeMenu.css" /> <link rel="stylesheet" type="text/css" href="css/easyui.css"> <script src="js/jquery-1.11.3.js"></script> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.easyui.min.js"></script><style> /*1级*/ .easyui-tree > li > div { width: 100%; height: 36px; background-color: rgba(14,156,245,0.4); border-bottom: 1px #1D3442 solid; font-size:0.875em ; color:#fff; font-family:"Microsoft YaHei"; } @media \0screen\,\screen\9 { .easyui-tree > li > div { position: static; background-color: #0E9CF5; *zoom: 1; filter: alpha(opacity=40); } } /*2*/ .easyui-tree > li ul li .tree-node { width: 100%; height: 36px; background-color: rgba(14,156,245,0.2); border-bottom: 1px #1D3442 solid; font-size:0.875em ; color:#fff; font-family:"Microsoft YaHei"; } @media \0screen\,\screen\9 { .easyui-tree > li ul li .tree-node { position: static; background-color: #0E9CF5; *zoom: 1; filter: alpha(opacity=20); } } /*3*/ .easyui-tree > li ul li > ul li .tree-node { width: 100%; height: 36px; background:url('') ; background-color: rgba(14,156,245,0.1); border-bottom: 1px #1D3442 solid; font-size:0.875em ; color:#fff; font-family:"Microsoft YaHei"; } @media \0screen\,\screen\9 { .easyui-tree > li ul li > ul li .tree-node { position: static; background-color: #0E9CF5; *zoom: 1; filter: alpha(opacity=20); } } /*1级的下拉按钮*/ .easyui-tree > li > div span:first-child{ background:url('img/seldown.png') no-repeat 90% 50%; float:right; margin-right:20px; margin-top:11px; } /*2级的下拉按钮*/ .easyui-tree > li ul li .tree-node span:nth-child(2){ background:url('img/seldown.png') no-repeat 90% 50%; float:right; margin-right:20px; margin-top:11px; } .zhankai{ background:url('img/zhankai.png') no-repeat 90% 50%; float:right; margin-right:20px; margin-top:11px; } /*移动变色*/ .tree-node-hover{ background-color:rgba(254,138,35,0.4) !important ; } @media \0screen\,\screen\9 { .tree-node-hover { position: static; background-color: #fe8a23 !important; *zoom: 1; filter: alpha(opacity=40); } } </style>index.html <!--设置--> <div id="monitoring"> <div id="leftArea"> <div id="btn"> <button class="btnitem" id="add">新建</button> <button class="btnitem" id="edit">修改</button> <button class="btnitem" id="remove">删除</button> </div> <div class="affixbox "> <div class="easyui-tree" style="padding:5px"> <ul id="tt" class="easyui-tree" data-options="url: 'tree_data.json',method: 'get',animate: true,onClick: function(node){$(this).tree('beginEdit',node.target);}"></ul> </div> </div> </div> <iframe id="rightArea" src="permission.html"></iframe> </div><script src="js/treeMenu.js"></script>
<script>
$('#tt').tree({
url: 'tree_data.json'
});
$('#tt').tree({
url: 'tree_data.json',
loadFilter: function (data) {
if (data.d) {
return data.d;
} else {
return data;
}
}
});
$(' .easyui-tree > li > div span:first-child').click(function () {
$(this).attr('style','background:url("img/zhankai.png") no-repeat 90% 50%');
})
</script>
tree_data.json
[{ "id":1, "text": "guangxun", "children":[{ "text":"yanfa", "state":"open", "attributes":{ "url":"/demo/book/abc", "price":100 }, "children":[{ "text":"lingdao", "checked":true }] },{ "text":"xiaoshou", "state":"open", "attributes":{ "url":"/demo/book/abc", "price":100 }, "children":[{ "text":"lingdao", "checked":true }] }] },{ "text":"yunke", "state":"closed", "children":[{ "text":"Java" },{ "text":"C#" }] }]
easyUI文档有详细案例
0 0
- easyUI的可编辑树
- EasyUI-可编辑的表格
- 【EasyUI】——可编辑的DataGrid
- 【easyui】datagrid的列可编辑
- easyui 可编辑表格
- EasyUI datagrid可编辑
- easyui 可编辑单元格
- EasyUI DataGrid可编辑单元格
- easyUI 设置列可编辑
- EasyUI datagrid可编辑行
- knockoutjs + easyui.treegrid 可编辑的自定义绑定插件
- jquery-easyui 中将表格变为可编辑的
- jQuery-easyUI的使用:datagrid实现可编辑表格
- 关于Easyui 可编辑的数据表格中的计算
- JQUERY EASYUI DATAGRID设置可编辑行的某个列不可编辑
- 关于easyui 可编辑表格使用心得
- EasyUI-DataGrid 可编辑补充说明
- easyui datagrid 设置可编辑行
- Android L 版本后uart console 没有root 权限
- VIM下,在文件及目录中查找字符串的方法 (vimgrep)
- 蓝桥杯 历届试题之数字游戏
- ffmpeg rtsp 解析
- C++解析SNMP报文——伪代码实现
- easyUI的可编辑树
- 好多鱼!
- elasticsearch query dsl url中如何使用
- LeetCode OJ-14.Longest Common Prefix
- 基本算法 C++
- C++多态(一)对象类型与虚函数
- 欢迎使用CSDN-markdown编辑器
- 计算机程序的思维逻辑 (72)
- 安卓关闭动画