EasyUI常用总结
2015-10-22 13:50
405 查看
EasyUI 常用总结
treeGridtooltip
layout
treegrid
js代码:$('#treeGrid').treegrid({ url : 'sys/resource/treeGrid', idField : 'id', treeField : 'name', frozenColumns : [ [ { field : 'id', title : '编号', width : 80 } ... ] ], columns : [ [{ width : '150', title : '上级资源', field : 'pid' }, ... { field : 'resourcetype', title : '资源类型', width : 100, formatter : function(value, row, index) { switch (value) { case 1: return '按钮'; case 0: return '菜单'; } } } , toolbar : '#toolbar' });
html代码:
<table title="文件目录" class="easyui-treegrid" style="width:700px;height:250px" data-options="url: 'queryFileTree.do', method: 'get', rownumbers: true, idField: 'fullPath', treeField: 'label'"> <thead> <tr> <th data-options="field:'label'" width="220">label</th> <th data-options="field:'fullPath'" width="150">fullPath</th> <th data-options="field:'type'" width="100" align="center">type</th> </tr> </thead> </table>
json数据格式:
[ { idFieldName:val1,treeFieldName:val2,...,children:[...] }, {...},... ]
节点折叠: 设置节点状态state=’closed|open’
tooltip
js代码:$("#controlId").tooltip({ position: 'left|right|top|bottom', content: 'html代码',//无该属性,默认显示控件title值 trackMouse:true,//跟随鼠标移动 onShow: function () { //自定义tooltip样式(最大宽度为500px,超过则自动换行) $(this).tooltip('tip').css({ maxWidth: '500px', wordWrap: 'break-word', wordBreak: 'normal' }); } });
html代码
<span class="easyui-tooltip" data-options="trackMouse:true,onShow:function () {...}" title="提示内容">内容</span>
layout
折叠左侧导航:$('#layout').layout('collapse','west');
相关文章推荐
- ios7之后 根据UILabel的文字计算frame的方法
- [转]UIColor,CGColor,CIColor三者的区别和联系
- 动态计算UITableViewCell高度详解
- Android stuido 快捷键
- Common Subsequence(dp入门题)
- iOS中 UISearchController 搜索栏 UI技术分享
- iOS中 UISearchController 搜索栏 UI技术分享
- 百度富文本编辑器ueditor上传文件到对象存储BOS中
- iOS 环信UI集成步骤
- Android 高级UI设计笔记02:可以拖动交换item位置的GridView(转载)
- Multimedia Programming Guide--多媒体编程指南
- iOS UICollectionView简单使用
- JAVA动态代理机制分析guide
- web_custom_request应用示例
- LoadRunner中web_custom_request 和 web_submit_data的差别
- java List<Item> its=new ArrayList<Item>(); Map按value中的某字段排序
- UI设计中色彩使用的技巧
- uip之UDP应用笔记
- uIP协议栈——转载:uIP之ARP:地址…
- 错误:Method not found: 'Void System.Web.UI.ScriptResourceDefinition.set_LoadSucce