easyui 简介
easyui是一种基于jquery的用户界面插件集合。
easyui为创建现代化,互动,javascript应用程序,提供必要的功能。
使用easyui你不需要写很多代码,你只需要通过编写一些简单html标记,就可以定义用户界面。
easyui是个完美支持html5网页的完整框架。
easyui节省您网页开发的时间和规模。
easyui很简单但功能强大的。
在后台管理系统开发的过程中,上左右的布局是最常见的页面布局方式,现在我们来看看使用easyui这个jquery前端框架如何快速搭建一个可用的页面框架。
1.在页面中引入easyui所需的文件
2.在页面body部分构建必要的html结构
欢迎登录
这里需要注意一点:easyui在使用layout布局的时候,north、south需要指定高度,west、east需要指定宽度,而center会自动适应高和宽。
3.使用js初始化easyui组件
我个人比较推荐使用js代码去初始化easyui组件,而不使用easyui标签中的data-options属性去初始化。因为对于后台开发人员来说,写js代码可能比写html标签更加熟悉,而且这样使得html代码更加简洁。
4.easyui-tree组件所需的json格式
easyui使用的传输格式为json,它对json内容的格式有比较严格的限制,所以请注意查看api
[{text:区域管理,attributes:{url:pages/consume/area/arealist.jsp}},{text:预约信息管理,children:[{text:商户预约信息查询,attributes:{url:/pages/consume/reservation/merchantreservation/merchantreservationlist.jsp}}]},{text:准入申请管理,children:[{text:商户准入申请,state:closed,children:[{text:商户待处理申请,attributes:{url:wateraply.do?method=tolist&channeltype=1&handleflag=aply_wait}},{text:商户审批中申请,attributes:{url:wateraply.do?method=tolist&channeltype=1&handleflag=aply_current}},{text:商户审批通过申请,attributes:{url:wateraply.do?method=tolist&channeltype=1&handleflag=aply_pass}},{text:商户被拒绝申请,attributes:{url:wateraply.do?method=tolist&channeltype=1&handleflag=aply_refuse}}]}]},{text:准入审批管理,children:[{text:商户审批管理,state:closed,children:[{text:当前任务,children:[{text:商户当前初审任务,attributes:{url:pages/consume/approval/merchantapproval/merchantapprovaltrial.jsp}},{text:商户当前复审任务,attributes:{url:pages/consume/approval/merchantapproval/merchantapprovalretrial.jsp}}]},{text:商户已完成任务,attributes:{url:pages/consume/approval/merchantapproval/merchantapprovaldone.jsp}},{text:商户不通过任务,attributes:{url:pages/consume/approval/merchantapproval/merchantapprovalrefuse.jsp}}]}]}]
就这样,我们使用easyui完成了简单的左右布局。
以上所述是小编给大家分享的jquery easyui实现上左右布局的相关内容,希望对大家有所帮助。